/*---------------------------------------------------------
 * 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,t){"use strict";function n(e,n){var r,i,o,a=Object.keys(n);for(i=0,o=a.length;o>i;i++){var s=a[i],c=95!==s.charCodeAt(0),u=n[s];!u||"object"!=typeof u||u.value===t&&"function"!=typeof u.get&&"function"!=typeof u.set?c?e[s]=u:(r=r||{},r[s]={value:u,enumerable:c,configurable:!0,writable:!0}):(u.enumerable===t&&(u.enumerable=c),r=r||{},r[s]=u)}r&&Object.defineProperties(e,r)}!function(t){function r(e,t,r){for(var i=e,o=t.split("."),a=0,s=o.length;s>a;a++){var c=o[a];i[c]||Object.defineProperty(i,c,{value:{},writable:!1,enumerable:!0,configurable:!0}),i=i[c]}return r&&n(i,r),i}function i(t,n){return r(e,t,n)}e[t]||(e[t]=Object.create(Object.prototype));var o=e[t];o.Namespace||(o.Namespace=Object.create(Object.prototype)),Object.defineProperties(o.Namespace,{defineWithParent:{value:r,writable:!0,enumerable:!0,configurable:!0},define:{value:i,writable:!0,enumerable:!0,configurable:!0}})}("WinJS"),function(e){function t(t,r,i){return t=t||function(){},e.Utilities.markSupportedForProcessing(t),r&&n(t.prototype,r),i&&n(t,i),t}function r(r,i,o,a){if(r){i=i||function(){};var s=r.prototype;return i.prototype=Object.create(s),e.Utilities.markSupportedForProcessing(i),Object.defineProperty(i.prototype,"constructor",{value:i,writable:!0,configurable:!0,enumerable:!0}),o&&n(i.prototype,o),a&&n(i,a),i}return t(i,o,a)}function i(e){e=e||function(){};var t,r;for(t=1,r=arguments.length;r>t;t++)n(e.prototype,arguments[t]);return e}e.Namespace.define("WinJS.Class",{define:t,derive:r,mix:i})}(e.WinJS)}(this),function(e,t){"use strict";function n(e){return e}function r(e,t,n){return e.split(".").reduce(function(e,t){return e?n(e[t]):null},t)}var i=!!e.Windows,o={notSupportedForProcessing:"Value is not supported within a declarative processing context, if you want it to be supported mark it using WinJS.Utilities.markSupportedForProcessing. The value was: '{0}'"};t.Namespace.define("WinJS.Utilities",{_setHasWinRT:{value:function(e){i=e},configurable:!1,writable:!1,enumerable:!1},hasWinRT:{get:function(){return i},configurable:!1,enumerable:!0},_getMemberFiltered:r,getMember:function(t,i){return t?r(t,i||e,n):null},ready:function(n,r){return new t.Promise(function(i,o){function a(){if(n)try{n(),i()}catch(e){o(e)}else i()}var s=t.Utilities.testReadyState;s||(s=e.document?document.readyState:"complete"),"complete"===s||e.document&&null!==document.body?r?e.setImmediate(a):a():e.addEventListener("DOMContentLoaded",a,!1)})},strictProcessing:{get:function(){return!0},configurable:!1,enumerable:!0},markSupportedForProcessing:{value:function(e){return e.supportedForProcessing=!0,e},configurable:!1,writable:!1,enumerable:!0},requireSupportedForProcessing:{value:function(n){var r=!0;switch(r=r&&!(n===e),r=r&&!(n===e.location),r=r&&!(n instanceof HTMLIFrameElement),r=r&&!("function"==typeof n&&!n.supportedForProcessing),e.frames.length){case 0:break;case 1:r=r&&!(n===e.frames[0]);break;default:for(var i=0,a=e.frames.length;r&&a>i;i++)r=r&&!(n===e.frames[i])}if(r)return n;throw new t.ErrorFromName("WinJS.Utilities.requireSupportedForProcessing",t.Resources._formatString(o.notSupportedForProcessing,n))},configurable:!1,writable:!1,enumerable:!0}}),t.Namespace.define("WinJS",{validation:!1,strictProcessing:{value:function(){},configurable:!1,writable:!1,enumerable:!1}})}(this,this.WinJS),function(e){"use strict";function t(e,t,n){var r=e;return"function"==typeof r&&(r=r()),(n&&o.test(n)?"":n?n+": ":"")+(t?t.replace(i,":")+": ":"")+r}function n(t,n,r){var i=e.Utilities.formatLog(t,n,r);console[r&&o.test(r)?r:"log"](i)}function r(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}var i=/\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("^("+r(t.type).replace(i," ").split(" ").join("|")+")$"),a=t.excludeTags&&new RegExp("(^|\\s)("+r(t.excludeTags).replace(i," ").split(" ").join("|")+")(\\s|$)","i"),s=t.tags&&new RegExp("(^|\\s)("+r(t.tags).replace(i," ").split(" ").join("|")+")(\\s|$)","i"),c=t.action||n;if(!(o||a||s||e.log))return e.log=c,void 0;var u=function(e,t,n){o&&!o.test(n)||a&&a.test(t)||s&&!s.test(t)||c(e,t,n),u.next&&u.next(e,t,n)};u.next=e.log,e.log=u},stopLog:function(){delete e.log},formatLog:t})}(this.WinJS),function(e){"use strict";function t(e){var t="_on"+e+"state";return{get:function(){var e=this[t];return e&&e.userHandler},set:function(n){var r=this[t];n?(r||(r={wrapper:function(e){return r.userHandler(e)},userHandler:n},Object.defineProperty(this,t,{value:r,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,r.wrapper,!1)),r.userHandler=n):r&&(this.removeEventListener(e,r.wrapper,!1),this[t]=null)},enumerable:!0}}function n(){for(var e={},n=0,r=arguments.length;r>n;n++){var i=arguments[n];e["on"+i]=t(i)}return e}var r=e.Class.define(function(e,t,n){this.detail=t,this.target=n,this.timeStamp=Date.now(),this.type=e},{bubbles:{value:!1,writable:!1},cancelable:{value:!1,writable:!1},currentTarget:{get:function(){return this.target}},defaultPrevented:{get:function(){return this._preventDefaultCalled}},trusted:{value:!1,writable:!1},eventPhase:{value:0,writable:!1},target:null,timeStamp:null,type:null,preventDefault:function(){this._preventDefaultCalled=!0},stopImmediatePropagation:function(){this._stopImmediatePropagationCalled=!0},stopPropagation:function(){}},{supportedForProcessing:!1}),i={_listeners:null,addEventListener:function(e,t,n){n=n||!1,this._listeners=this._listeners||{};for(var r=this._listeners[e]=this._listeners[e]||[],i=0,o=r.length;o>i;i++){var a=r[i];if(a.useCapture===n&&a.listener===t)return}r.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){var i=new r(e,t,this);n=n.slice(0,n.length);for(var o=0,a=n.length;a>o&&!i._stopImmediatePropagationCalled;o++)n[o].listener(i);return i.defaultPrevented||!1}return!1},removeEventListener:function(e,t,n){n=n||!1;var r=this._listeners&&this._listeners[e];if(r)for(var i=0,o=r.length;o>i;i++){var a=r[i];if(a.listener===t&&a.useCapture===n){r.splice(i,1),0===r.length&&delete this._listeners[e];break}}}};e.Namespace.define("WinJS.Utilities",{_createEventProperty:t,createEventProperties:n,eventMixin:i})}(this.WinJS),function(e,t,n){"use strict";var r,i=!1,o="contextchanged",a=t.Class.mix(t.Class.define(null,{},{supportedForProcessing:!1}),t.Utilities.eventMixin),s=new a,c={malformedFormatStringInput:"Malformed, did you mean to escape your '{0}'?"};t.Namespace.define("WinJS.Resources",{addEventListener:function(e,n,r){if(t.Utilities.hasWinRT&&!i&&e===o)try{Windows.ApplicationModel.Resources.Core.ResourceManager.current.defaultContext.qualifierValues.addEventListener("mapchanged",function(e){t.Resources.dispatchEvent(o,{qualifier:e.key,changed:e.target[e.key]})},!1),i=!0}catch(a){}s.addEventListener(e,n,r)},removeEventListener:s.removeEventListener.bind(s),dispatchEvent:s.dispatchEvent.bind(s),_formatString:function(e){var n=arguments;return n.length>1&&(e=e.replace(/({{)|(}})|{(\d+)}|({)|(})/g,function(e,r,i,o,a,s){if(a||s)throw t.Resources._formatString(c.malformedFormatStringInput,a||s);return r&&"{"||i&&"}"||n[(0|o)+1]})),e},_getStringWinRT:function(e){if(!r){var t=Windows.ApplicationModel.Resources.Core.ResourceManager.current.mainResourceMap;try{r=t.getSubtree("Resources")}catch(i){}r||(r=t)}var o,a,s;try{s=r.getValue(e),s&&(o=s.valueAsString,o===n&&(o=s.toString()))}catch(i){}if(!o)return{value:e,empty:!0};try{a=s.getQualifierValue("Language")}catch(i){return{value:o}}return{value:o,lang:a}},_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 u;t.Resources.getString=function(e){return(u=u||(t.Utilities.hasWinRT?t.Resources._getStringWinRT:t.Resources._getStringJS))(e)}}(this,this.WinJS),function(e,t,n){"use strict";function r(){}function i(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?P:R,e._value=t,e._setState(n)}function o(e,t,n,r,i,o){return{exception:e,error:t,promise:n,handler:o,id:r,parent:i}}function a(e,t,n,r){var i=n._isException,a=n._errorId;return o(i?t:null,i?null:t,e,a,n,r)}function s(e,t,n){var r=n._isException,i=n._errorId;return v(e,i,r),o(r?t:null,r?null:t,e,i,n)}function c(e,t){var n=++B;return v(e,n),o(null,t,e,n)}function u(e,t){var n=++B;return v(e,n,!0),o(t,null,e,n)}function l(e,t,n,r){g(e,{c:t,e:n,p:r})}function p(e,t,n,r){e._value=t,h(e,t,n,r),e._setState(F)}function d(e,t){var n=e._value,r=e._listeners;if(r){e._listeners=null;var i,o;for(i=0,o=Array.isArray(r)?r.length:1;o>i;i++){var a=1===o?r:r[i],s=a.c,c=a.promise;if(c){try{c._setCompleteValue(s?s(n):n)}catch(u){c._setExceptionValue(u)}c._state!==P&&c._listeners&&t.push(c)}else z.prototype.done.call(e,s)}}}function m(e,t){var n=e._value,r=e._listeners;if(r){e._listeners=null;var i,o;for(i=0,o=Array.isArray(r)?r.length:1;o>i;i++){var s=1===o?r:r[i],c=s.e,u=s.promise;if(u){try{c?(c.handlesOnError||h(u,n,a,e,c),u._setCompleteValue(c(n))):u._setChainedErrorValue(n,e)}catch(l){u._setExceptionValue(l)}u._state!==P&&u._listeners&&t.push(u)}else G.prototype.done.call(e,null,c)}}}function h(e,t,n,r,i){if(k._listeners[C]){if(t instanceof Error&&t.message===w)return;k.dispatchEvent(C,n(e,t,r,i))}}function f(e,t){var n=e._listeners;if(n){var r,i;for(r=0,i=Array.isArray(n)?n.length:1;i>r;r++){var o=1===i?n:n[r],a=o.p;if(a)try{a(t)}catch(s){}o.c||o.e||!o.promise||o.promise._progress(t)}}}function g(e,t){var n=e._listeners;n?(n=Array.isArray(n)?n:[n],n.push(t)):n=t,e._listeners=n}function v(e,t,n){e._isException=n||!1,e._errorId=t}function y(e,t,n,r){e._value=t,h(e,t,n,r),e._setState(V)}function _(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?P:D,e._value=t,e._setState(n)}function b(e,t,n,r){var i=new U(e);return g(e,{promise:i,c:t,e:n,p:r}),i}function E(e){var n;return new t.Promise(function(t){e?n=setTimeout(t,e):setImmediate(t)},function(){n&&clearTimeout(n)})}function T(e,t){var n=function(){t.cancel()},r=function(){e.cancel()};return e.then(n),t.then(r,r),t}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var S=t.Class.mix(t.Class.define(null,{},{supportedForProcessing:!1}),t.Utilities.eventMixin),k=new S;k._listeners={};var C="error",w="Canceled",x=!1,A={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};A.all=A.promise|A.thenPromise|A.errorPromise|A.exceptionPromise|A.completePromise;var L,N,P,O,I,M,R,D,F,V,B=1;L={name:"created",enter:function(e){e._setState(N)},cancel:r,done:r,then:r,_completed:r,_error:r,_notify:r,_progress:r,_setCompleteValue:r,_setErrorValue:r},N={name:"working",enter:r,cancel:function(e){e._setState(I)},done:l,then:b,_completed:i,_error:p,_notify:r,_progress:f,_setCompleteValue:_,_setErrorValue:y},P={name:"waiting",enter:function(e){var t=e._value,n=function(r){t._errorId?e._chainedError(r,t):(h(e,r,a,t,n),e._error(r))};n.handlesOnError=!0,t.then(e._completed.bind(e),n,e._progress.bind(e))},cancel:function(e){e._setState(O)},done:l,then:b,_completed:i,_error:p,_notify:r,_progress:f,_setCompleteValue:_,_setErrorValue:y},O={name:"waiting_canceled",enter:function(e){e._setState(M);var t=e._value;t.cancel&&t.cancel()},cancel:r,done:l,then:b,_completed:i,_error:p,_notify:r,_progress:f,_setCompleteValue:_,_setErrorValue:y},I={name:"canceled",enter:function(e){e._setState(M),e._cancelAction()},cancel:r,done:l,then:b,_completed:i,_error:p,_notify:r,_progress:f,_setCompleteValue:_,_setErrorValue:y},M={name:"canceling",enter:function(e){var t=new Error(w);t.name=t.message,e._value=t,e._setState(F)},cancel:r,done:r,then:r,_completed:r,_error:r,_notify:r,_progress:r,_setCompleteValue:r,_setErrorValue:r},R={name:"complete_notify",enter:function(e){if(e.done=z.prototype.done,e.then=z.prototype.then,e._listeners)for(var t,n=[e];n.length;)t=n.pop(),t._state._notify(t,n);e._setState(D)},cancel:r,done:null,then:null,_completed:r,_error:r,_notify:d,_progress:r,_setCompleteValue:r,_setErrorValue:r},D={name:"success",enter:function(e){e.done=z.prototype.done,e.then=z.prototype.then,e._cleanupAction()},cancel:r,done:null,then:null,_completed:r,_error:r,_notify:d,_progress:r,_setCompleteValue:r,_setErrorValue:r},F={name:"error_notify",enter:function(e){if(e.done=G.prototype.done,e.then=G.prototype.then,e._listeners)for(var t,n=[e];n.length;)t=n.pop(),t._state._notify(t,n);e._setState(V)},cancel:r,done:null,then:null,_completed:r,_error:r,_notify:m,_progress:r,_setCompleteValue:r,_setErrorValue:r},V={name:"error",enter:function(e){e.done=G.prototype.done,e.then=G.prototype.then,e._cleanupAction()},cancel:r,done:null,then:null,_completed:r,_error:r,_notify:m,_progress:r,_setCompleteValue:r,_setErrorValue:r};var $,j=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,s,t);return this._run(),n},_completed:function(e){var t=this._state._completed(this,e);return this._run(),t},_error:function(e){var t=this._state._error(this,e,c);return this._run(),t},_progress:function(e){this._state._progress(this,e)},_setState:function(e){this._nextState=e},_setCompleteValue:function(e){this._state._setCompleteValue(this,e),this._run()},_setChainedErrorValue:function(e,t){var n=this._state._setErrorValue(this,e,s,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,u);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),U=t.Class.derive(j,function(e){x&&(x===!0||x&A.thenPromise)&&(this._stack=t.Promise._getStack()),this._creator=e,this._setState(L),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),G=t.Class.define(function(e){x&&(x===!0||x&A.errorPromise)&&(this._stack=t.Promise._getStack()),this._value=e,h(this,e,c)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||h(null,n,a,this,t);var r=t(n);return r&&"object"==typeof r&&"function"==typeof r.done&&r.done(),void 0}catch(i){n=i}n instanceof Error&&n.message===w||setImmediate(function(){throw n})},then:function(e,t){if(!t)return this;var n,r=this._value;try{t.handlesOnError||h(null,r,a,this,t),n=new z(t(r))}catch(i){n=i===r?this:new H(i)}return n}},{supportedForProcessing:!1}),H=t.Class.derive(G,function(e){x&&(x===!0||x&A.exceptionPromise)&&(this._stack=t.Promise._getStack()),this._value=e,h(this,e,u)},{},{supportedForProcessing:!1}),z=t.Class.define(function(e){if(x&&(x===!0||x&A.completePromise)&&(this._stack=t.Promise._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var n=new U(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 z(t)}catch(n){return new H(n)}}},{supportedForProcessing:!1}),W=t.Class.derive(j,function(e,n){x&&(x===!0||x&A.promise)&&(this._stack=t.Promise._getStack()),this._oncancel=n,this._setState(L),this._run();try{var r=this._completed.bind(this),i=this._error.bind(this),o=this._progress.bind(this);e(r,i,o)}catch(a){this._setExceptionValue(a)}},{_oncancel:null,_cancelAction:function(){try{if(!this._oncancel)throw new Error("Promise did not implement oncancel");this._oncancel()}catch(e){{e.message,e.stack}k.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){k.addEventListener(e,t,n)},any:function(e){return new W(function(n,r){{var i=Object.keys(e);Array.isArray(e)?[]:{}}0===i.length&&n();var o=0;i.forEach(function(a){W.as(e[a]).then(function(){n({key:a,value:e[a]})},function(s){return s instanceof Error&&s.name===w?(++o===i.length&&n(t.Promise.cancel),void 0):(r({key:a,value:e[a]}),void 0)})})},function(){var t=Object.keys(e);t.forEach(function(t){var n=W.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new z(e)},cancel:{get:function(){return $=$||new G(new t.ErrorFromName(w))}},dispatchEvent:function(e,t){return k.dispatchEvent(e,t)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new W(function(r,i,o){var a=Object.keys(e),s=Array.isArray(e)?[]:{},c=Array.isArray(e)?[]:{},u=0,l=a.length,p=function(e){if(0===--l){var n=Object.keys(s).length;if(0===n)r(c);else{var u=0;a.forEach(function(e){var t=s[e];t instanceof Error&&t.name===w&&u++}),u===n?r(t.Promise.cancel):i(s)}}else o({Key:e,Done:!0})};return a.forEach(function(t){var r=e[t];r===n?u++:W.then(r,function(e){c[t]=e,p(t)},function(e){s[t]=e,p(t)})}),l-=u,0===l?(r(c),void 0):void 0},function(){Object.keys(e).forEach(function(t){var n=W.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},removeEventListener:function(e,t,n){k.removeEventListener(e,t,n)},supportedForProcessing:!1,then:function(e,t,n,r){return W.as(e).then(t,n,r)},thenEach:function(e,t,n,r){var i=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(o){i[o]=W.as(e[o]).then(t,n,r)}),W.join(i)},timeout:function(e,t){var n=E(e);return t?T(n,t):n},wrap:function(e){return new z(e)},wrapError:function(e){return new G(e)},_veryExpensiveTagWithStack:{get:function(){return x},set:function(e){x=e}},_veryExpensiveTagWithStack_tag:A,_getStack:function(){if(Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}}});Object.defineProperties(W,t.Utilities.createEventProperties(C));var q=t.Class.derive(j,function(e){this._oncancel=e,this._setState(L),this._run()},{_cancelAction:function(){this._oncancel&&this._oncancel()},_cleanupAction:function(){this._oncancel=null}},{supportedForProcessing:!1}),K=t.Class.define(function(e){this._promise=new q(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:W,_Signal:K})}(this,this.WinJS),function(e,t){"use strict";t.Namespace.define("WinJS",{ErrorFromName:t.Class.derive(Error,function(e,t){this.name=e,this.message=t||e},{},{supportedForProcessing:!1})})}(this,this.WinJS),function(e){"use strict";e.Namespace.define("WinJS",{xhr:function(t){var n;return new e.Promise(function(e,r,i){n=new XMLHttpRequest,n.onreadystatechange=function(){n._canceled||(4===n.readyState?(n.status>=200&&n.status<300||1223===n.status?e(n):r(n),n.onreadystatechange=function(){}):i(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){"use strict";var n,r,i,o,a,s,c={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=r=function(e,t){e.innerHTML=t},i=o=function(e,t){e.outerHTML=t},a=s=function(e,t,n){e.insertAdjacentHTML(t,n)};var u=e.MSApp;if(u)r=function(e,t){u.execUnsafeLocalFunction(function(){e.innerHTML=t})},o=function(e,t){u.execUnsafeLocalFunction(function(){e.outerHTML=t})},s=function(e,t,n){u.execUnsafeLocalFunction(function(){e.insertAdjacentHTML(t,n)})};else if(e.msIsStaticHTML){var l=function(n){if(!e.msIsStaticHTML(n))throw new t.ErrorFromName("WinJS.Utitilies.NonStaticHTML",c.nonStaticHTML)};n=function(e,t){l(t),e.innerHTML=t},i=function(e,t){l(t),e.outerHTML=t},a=function(e,t,n){l(n),e.insertAdjacentHTML(t,n)}}t.Namespace.define("WinJS.Utilities",{setInnerHTML:n,setInnerHTMLUnsafe:r,setOuterHTML:i,setOuterHTMLUnsafe:o,insertAdjacentHTML:a,insertAdjacentHTMLUnsafe:s})}(this,this.WinJS)),function(e){"undefined"==typeof exports&&"function"==typeof define&&define.amd?define("vs/base/common/winjs.base.raw",e.WinJS):module.exports=e.WinJS}(this),define("vs/base/common/types",["require","exports"],function(e,t){function n(e){return Array.isArray?Array.isArray(e):e&&"number"==typeof e.length&&e.constructor===Array?!0:!1}function r(e){return"string"==typeof e||e instanceof String?!0:!1}function i(e){return"undefined"==typeof e||null===e?!1:"[object Object]"===Object.prototype.toString.call(e)}function o(e){return("number"==typeof e||e instanceof Number)&&!isNaN(e)?!0:!1}function a(e){return e===!0||e===!1}function s(e){return"undefined"==typeof e}function c(e){return s(e)||null===e}function u(e){if(!i(e))return!1;for(var t in e)if(m.call(e,t))return!1;return!0}function l(e){return"[object Function]"===Object.prototype.toString.call(e)}function p(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e&&e.length>0&&e.every(function(e){return l(e)})}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Object.create(e.prototype);return e.apply(r,t),r}t.isArray=n,t.isString=r,t.isObject=i,t.isNumber=o,t.isBoolean=a,t.isUndefined=s,t.isUndefinedOrNull=c;var m=Object.prototype.hasOwnProperty;t.isEmptyObject=u,t.isFunction=l,t.areFunctions=p,t.create=d}),define("vs/base/common/objects",["require","exports","vs/base/common/types"],function(e,t,n){function r(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(n){t[n]=e[n]&&"object"==typeof e[n]?r(e[n]):e[n]}),t}function i(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]?i(e[n]):e[n]}),t}function o(e,t){return a(e,t,[])}function a(e,t,r){if(n.isUndefinedOrNull(e))return e;var i=t(e);if("undefined"!=typeof i)return i;if(n.isArray(e)){for(var o=[],s=0;s<e.length;s++)o.push(a(e[s],t,r));return o}if(n.isObject(e)){if(r.indexOf(e)>=0)throw new Error("Cannot clone recursive data-structure");r.push(e);var c={};for(var u in e)v.call(e,u)&&(c[u]=a(e[u],t,r));return r.pop(),c}return e}function s(e,t,r){return void 0===r&&(r=!0),n.isObject(e)?(n.isObject(t)&&Object.keys(t).forEach(function(i){i in e?r&&(n.isObject(e[i])&&n.isObject(t[i])?s(e[i],t[i],r):e[i]=t[i]):e[i]=t[i]}),e):t}function c(e,t){return Object.keys(t).forEach(function(n){return e[n]=t[n]}),e}function u(e,t){return s(r(t),e||{})}function l(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,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1}else{var i=[];for(r in e)i.push(r);i.sort();var o=[];for(r in t)o.push(r);if(o.sort(),!l(i,o))return!1;for(n=0;n<i.length;n++)if(!l(e[i[n]],t[i[n]]))return!1}return!0}function p(e,t,n){"undefined"==typeof e[t]&&(e[t]=n)}function d(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}function m(e,t){void 0===t&&(t=!1),t&&(e=e.map(function(e){return e.toLowerCase()}));var n=d(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 r=e.prototype,i=t.prototype;t.prototype=Object.create(r);for(var n in i)i.hasOwnProperty(n)&&Object.defineProperty(t.prototype,n,Object.getOwnPropertyDescriptor(i,n));Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0,enumerable:!0})}function f(e){var t=[];return JSON.stringify(e,function(e,r){if(n.isObject(r)||Array.isArray(r)){if(-1!==t.indexOf(r))return"[Circular]";t.push(r)}return r})}var g=function(){function e(e,t){this.first=e,this.second=t}return e}();t.Tuple=g,t.clone=r,t.deepClone=i;var v=Object.prototype.hasOwnProperty;t.cloneAndChange=o,t.mixin=s,t.assign=c,t.withDefaults=u,t.equals=l,t.ensureProperty=p,t.arrayToHash=d,t.createKeywordMatcher=m,t.derive=h,t.safeStringify=f}),define("vs/base/common/platform",["require","exports"],function(e,t){function n(){return"undefined"!=typeof p.Worker}var r=!1,i=!1,o=!1,a=!1,s=!1,c=!1;if("object"==typeof process)r="win32"===process.platform,i="darwin"===process.platform,o="linux"===process.platform,a=!0;else if("object"==typeof navigator){var u=navigator.userAgent;r=u.indexOf("Windows")>=0,i=u.indexOf("Macintosh")>=0,o=u.indexOf("Linux")>=0,s=!0,c=!!self.QUnit}!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 l=t.Platform;t._platform=l.Web,a&&(i?t._platform=l.Mac:r?t._platform=l.Windows:o&&(t._platform=l.Linux)),t.isWindows=r,t.isMacintosh=i,t.isLinux=o,t.isNative=a,t.isWeb=s,t.isQunit=c,t.platform=t._platform;var p="object"==typeof self?self:global;t.globals=p,t.hasWebWorkerSupport=n,t.setTimeout=p.setTimeout.bind(p),t.clearTimeout=p.clearTimeout.bind(p),t.setInterval=p.setInterval.bind(p),t.clearInterval=p.clearInterval.bind(p)}),define("vs/base/common/strings",["require","exports","vs/nls!vs/workbench/services/files/node/watcher/unix/watcherApp"],function(e,t,n){function r(e,t,n){void 0===n&&(n="0");for(var r=""+e,i=[r],o=r.length;t>o;o++)i.push(n);return i.reverse().join("")}function i(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 0===t.length?e:e.replace(H,function(e,n){var r=parseInt(n,10);return isNaN(r)||0>r||r>=t.length?e:t[r]})}function o(e){return void 0===e&&(e=new Date),n.localize("vs_base_common_strings",0,r(e.getMonth()+1,2),r(e.getDate(),2),r(e.getFullYear(),4),r(e.getHours(),2),r(e.getMinutes(),2),r(e.getSeconds(),2))}function a(e){return void 0===e&&(e=new Date),n.localize("vs_base_common_strings",1,r(e.getHours(),2),r(e.getMinutes(),2),r(e.getSeconds(),2))}function s(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})}function c(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function u(e,t,n){return e.replace(new RegExp(c(t.toString()),"g"),n)}function l(e,t){void 0===t&&(t=" ");var n=p(e,t);return d(n,t)}function p(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var r=0,i=-1;(i=e.indexOf(t,r))===r;)r+=n;return e.substring(r)}function d(e,t){if(!e||!t)return e;var n=t.length,r=e.length;if(0===n||0===r)return e;for(var i=r,o=-1;;){if(o=e.lastIndexOf(t,i-1),-1===o||o+n!==i)break;if(0===o)return"";i=o}return e.substring(0,i)}function m(e){return e.replace(/(^\s+|\s+$)/g,"")}function h(e){return e.replace(/\s+/g," ")}function f(e){var t=(new Date).getTime(),r=(t-e)/1e3;if(60>r)return n.localize("vs_base_common_strings",2,Math.floor(r));var i=r/60;if(60>i)return n.localize("vs_base_common_strings",3,Math.floor(i));var o=i/60;if(24>o)return n.localize("vs_base_common_strings",4,Math.floor(o));var a=o/24;return n.localize("vs_base_common_strings",5,Math.floor(a))}function g(e){var t=(new Date).getTime(),r=(t-e)/1e3;if(60>r)return n.localize("vs_base_common_strings",6);var i=r/60;if(60>i)return 1===Math.floor(i)?n.localize("vs_base_common_strings",7):n.localize("vs_base_common_strings",8,Math.floor(i));var o=i/60;if(24>o)return 1===Math.floor(o)?n.localize("vs_base_common_strings",9):n.localize("vs_base_common_strings",10,Math.floor(o));var a=o/24;return 1===Math.floor(a)?n.localize("vs_base_common_strings",11):a>6&&8>a?n.localize("vs_base_common_strings",12):a>30&&40>a?n.localize("vs_base_common_strings",13):n.localize("vs_base_common_strings",14,Math.floor(a))}function v(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function y(e){return u(e,"*","")}function _(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function b(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===e.length-t.length:0===n?e===t:!1}function E(e,t,n,r){return void 0===r&&(r=""),e.substring(0,t)+r+e.substring(t+n)}function T(e,t,n,r){if(""===e)throw new Error("Cannot create regex from empty string");t||(e=e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")),r&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="g";return n||(i+="i"),new RegExp(e,i)}function S(e){var t=e.exec("");return t&&0===e.lastIndex}function k(e,t){if(!e)return e;if(t){for(var n=e.split("/"),r=0,i=n.length;i>r;r++)n[r]=encodeURIComponent(n[r]);return n.join("/")}return encodeURIComponent(e)}function C(e){return/^\w[\w.]*$/.test(e)}function w(e){return!e||!e.trim()}function x(e,t,n){return t&&(e="^"+e),n&&(e+="$"),e}function A(e,t){if(S(new RegExp(e,t)))throw new Error("Regular expression /"+e+"/g results in infinitive matches")}function L(e){return e?(0===e.indexOf("/")&&(e=e.substring(1)),k(e,!0)):""}function N(e,t){return"["+e+"m"+t+"[0m"}function P(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 I(e){for(var t=e.length-1;t>=0;t--)if(" "!==e.charAt(t)&&"	"!==e.charAt(t))return t;return-1}function M(e,t){return e.localeCompare(t)}function R(e){return e>=97&&122>=e||e>=65&&90>=e}function D(e,t){var n=e.length,r=t.length;if(n!==r)return!1;for(var i=0;n>i;i++){var o=e.charCodeAt(i),a=t.charCodeAt(i);if(o!==a)if(R(o)&&R(a)){var s=Math.abs(o-a);if(0!==s&&32!==s)return!1}else if(String.fromCharCode(o).toLocaleLowerCase()!==String.fromCharCode(a).toLocaleLowerCase())return!1}return!0}function F(e,t){var n,r=Math.min(e.length,t.length);for(n=0;r>n;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return r}function V(e,t){var n,r=Math.min(e.length,t.length),i=e.length-1,o=t.length-1;for(n=0;r>n;n++)if(e.charCodeAt(i-n)!==t.charCodeAt(o-n))return n;return r}function B(e,t,n){void 0===n&&(n=4);var r=Math.abs(e.length-t.length);if(r>n)return 0;var i,o,a=[],s=[];for(i=0;i<t.length+1;++i)s.push(0);for(i=0;i<e.length+1;++i)a.push(s);for(i=1;i<e.length+1;++i)for(o=1;o<t.length+1;++o)a[i][o]=e[i-1]===t[o-1]?a[i-1][o-1]+1:Math.max(a[i-1][o],a[i][o-1]);return a[e.length][t.length]-Math.sqrt(r)}function $(e){for(var t,n=/\r\n|\r|\n/g,r=[0];t=n.exec(e);)r.push(n.lastIndex);return r}function j(e,n){if(e.length<n)return e;for(var r=e.split(/\b/),i=0,o=r.length-1;o>=0;o--)if(i+=r[o].length,i>n){r.splice(0,o);break}return r.join(t.empty).replace(/^\s/,t.empty)}function U(e){return e&&(e=e.replace(z,""),e=e.replace(W,"\n"),e=e.replace(q,""),e=e.replace(K,"")),e}function G(e){return e&&e.length>0&&e.charCodeAt(0)===Y}t.empty="",t.pad=r;var H=/{(\d+)}/g;t.format=i,t.formatDate=o,t.formatTime=a,t.escape=s,t.escapeRegExpCharacters=c,t.replaceAll=u,t.trim=l,t.ltrim=p,t.rtrim=d,t.trimWhitespace=m,t.normalize=h,t.conciseformatDiff=f,t.verboseformatDiff=g,t.convertSimple2RegExpPattern=v,t.stripWildcards=y,t.startsWith=_,t.endsWith=b,t.splice=E,t.createRegExp=T,t.regExpLeadsToEndlessLoop=S,t.encodeURIPart=k,t.isCamelCasePattern=C,t.isFalsyOrWhitespace=w,t.anchorPattern=x,t.assertRegExp=A,t.normalizePath=L,t.colorize=N,t.firstNonWhitespaceIndex=P,t.getLeadingWhitespace=O,t.lastNonWhitespaceIndex=I,t.localeCompare=M,t.equalsIgnoreCase=D,t.commonPrefixLength=F,t.commonSuffixLength=V,t.difference=B,t.computeLineStarts=$,t.lcut=j;
var z=/\x1B\x5B[12]?K/g,W=/\xA/g,q=/\x1b\[\d+m/g,K=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=U;var Y=65279;t.UTF8_BOM_CHARACTER=String.fromCharCode(Y),t.startsWithUTF8BOM=G}),define("vs/base/common/errors",["require","exports","vs/nls!vs/workbench/services/files/node/watcher/unix/watcherApp","vs/base/common/objects","vs/base/common/platform","vs/base/common/types","vs/base/common/strings"],function(e,t,n,r,i,o,a){function s(e){t.errorHandler.setUnexpectedErrorHandler(e)}function c(e){h(e)||t.errorHandler.onUnexpectedError(e)}function u(e){if(!(e instanceof Error))return e;var t={};return e.stacktrace?t.stack=e.stacktrace:e.stack&&(t.stack=e.stack),t.message=e.toString(),t}function l(e,t){var n=new T(e);return t?n.verboseMessage:n.message}function p(e,t){return t&&e.message&&(e.stack||e.stacktrace)?n.localize("vs_base_common_errors",7,e.message,e.stack||e.stacktrace):e.message?e.message:n.localize("vs_base_common_errors",8)}function d(e,t){if(void 0===e&&(e=null),void 0===t&&(t=!1),!e)return n.localize("vs_base_common_errors",9);if(o.isString(e))return e;if(!o.isUndefinedOrNull(e.status))return l(e,t);if(e.detail){var r=e.detail;if(r.error){if(r.error&&!o.isUndefinedOrNull(r.error.status))return l(r.error,t);if(!o.isArray(r.error))return p(r.error,t);for(var i=0;i<r.error.length;i++)if(r.error[i]&&!o.isUndefinedOrNull(r.error[i].status))return l(r.error[i],t)}if(r.exception)return o.isUndefinedOrNull(r.exception.status)?p(r.exception,t):l(r.exception,t)}return e.stack?p(e,t):e.message?e.message:n.localize("vs_base_common_errors",10)}function m(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 h(e){return e instanceof Error&&e.name===S&&e.message===S}function f(){var e=new Error(S);return e.name=e.message,e}function g(){return new Error(n.localize("vs_base_common_errors",11))}function v(e){return e?new Error(n.localize("vs_base_common_errors",12,e)):new Error(n.localize("vs_base_common_errors",13))}function y(e){return e?new Error(n.localize("vs_base_common_errors",14,e)):new Error(n.localize("vs_base_common_errors",15))}function _(e){return i.isWeb?new Error(n.localize("vs_base_common_errors",16)):new Error(n.localize("vs_base_common_errors",17,JSON.stringify(e)))}function b(e,t){void 0===t&&(t=null);var n=new Error(e);return t&&(n.actions=t),n}var E=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){i.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=E,t.errorHandler=new E,t.setUnexpectedErrorHandler=s,t.onUnexpectedError=c,t.transformErrorForSerialization=u;var T=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(r){}}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 r=e.errorCode,i=e.errorMessage;return null!==r&&null!==i?n.localize("vs_base_common_errors",0,a.rtrim(i,"."),r):null!==i?i:t&&null!==e.responseText?e.responseText:null},e.prototype.connectionErrorToMessage=function(e,t){var r=this.connectionErrorDetailsToMessage(e,t);return 401===e.status?null!==r?n.localize("vs_base_common_errors",1,r):n.localize("vs_base_common_errors",2):r?r:e.status>0&&null!==e.statusText?t&&null!==e.responseText&&e.responseText.length>0?n.localize("vs_base_common_errors",3,e.statusText,e.status,e.responseText):n.localize("vs_base_common_errors",4,e.statusText,e.status):t&&null!==e.responseText&&e.responseText.length>0?n.localize("vs_base_common_errors",5,e.responseText):n.localize("vs_base_common_errors",6)},e}();t.ConnectionError=T,r.derive(Error,T),t.toErrorMessage=d,t.getHttpStatus=m;var S="Canceled";t.isPromiseCanceledError=h,t.canceled=f,t.notImplemented=g,t.illegalArgument=v,t.illegalState=y,t.loaderError=_,t.error=b}),define("vs/base/common/winjs.base",["./winjs.base.raw","vs/base/common/errors","vs/base/common/platform"],function(e,t,n){"use strict";function r(e){if(!n.isNative){var r=e.detail,i=r.id;if(r.parent)return r.handler&&a&&delete a[i],void 0;a[i]=r,1===Object.keys(a).length&&setTimeout(function(){var e=a;a={},Object.keys(e).forEach(function(n){var r=e[n];r.exception?t.onUnexpectedError(r.exception):r.error&&t.onUnexpectedError(r.error),console.log("WARNING: Promise with no error callback:"+r.id),console.log(r),r.exception&&console.log(r.exception.stack)})},0)}}function i(e,t,n){var r,i,a,s=new o.Promise(function(e,t,n){r=e,i=t,a=n},function(){e.cancel()});return e.then(function(e){t&&t(e),r(e)},function(e){n&&n(e),i(e)},a),s}var o=e,a={};return o.Promise.addEventListener("error",r),{decoratePromise:i,Class:o.Class,xhr:o.xhr,Promise:o.Promise,TPromise:o.Promise,PPromise:o.Promise,Utilities:o.Utilities}});var __extends=this&&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/common/async",["require","exports","vs/base/common/errors","vs/base/common/winjs.base","vs/base/common/platform"],function(e,t,n,r,i){function o(e,t){return new r.TPromise(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 a(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.TPromise.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 c=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=new r.Promise(function(e,r,i){t.activePromise.then(n,n,i).done(e)},function(){t.activePromise.cancel()})}return new r.Promise(function(e,n,r){t.queuedPromise.then(e,n,r)},function(){})}return this.activePromise=e(),new r.Promise(function(e,n,r){t.activePromise.done(function(n){t.activePromise=null,e(n)},function(e){t.activePromise=null,n(e)},r)},function(){t.activePromise.cancel()})},e}();t.Throttler=c;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 c}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 p=function(e){function t(t,n){void 0===n&&(n=0),e.call(this,t),this.minimumPeriod=n,this.periodThrottler=new c}return __extends(t,e),t.prototype.trigger=function(t,n){var i=this;return e.prototype.trigger.call(this,function(){return i.periodThrottler.queue(function(){return r.Promise.join([r.Promise.timeout(i.minimumPeriod),t()]).then(function(e){return e[1]})})},n)},t}(l);t.PeriodThrottledDelayer=p;var d=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=d;var m=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=m,t.always=o,t.sequence=a,t.once=s;var h=function(){function e(e){this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0}return e.prototype.queue=function(e){var t=this;return new r.TPromise(function(n,r,i){t.outstandingPromises.push({factory:e,c:n,e:r,p:i}),t.consume()})},e.prototype.consume=function(){for(var e=this;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){var t=this.outstandingPromises.shift();this.runningPromises++;var n=t.factory();n.done(t.c,t.e,t.p),n.done(function(){return e.consumed()},function(){return e.consumed()})}},e.prototype.consumed=function(){this.runningPromises--,this.consume()},e}();t.Limiter=h;var f=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&&(i.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=i.setTimeout(this.timeoutHandler,this.timeout)},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.runner()},e}();t.RunOnceScheduler=f}),define("vs/base/node/service",["require","exports","vs/base/common/winjs.base","vs/base/common/async","vs/base/common/objects","path","child_process"],function(e,t,n,r,i,o,a){function s(e,t){var n={},r=new h({send:function(e){return t.connected&&t.send(e)},onMessage:function(e){return t.on("message",e)}});return Object.keys(e.prototype).filter(function(e){return"constructor"!==e}).forEach(function(e){n[e]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n-0]=arguments[n];return t.unshift(e),r.request.apply(r,t)}}),{service:n,dispose:function(){return t.kill()}}}function c(e){var t=new m({send:function(e){return process.send(e)},onMessage:function(e){return process.on("message",e)}},e);process.once("disconnect",function(){return t.dispose()})}function u(e,t,c){var u={},l=null,p=[],d=c&&c.timeout?c.timeout:Number.MAX_VALUE,m=d===Number.MAX_VALUE?null:new r.Delayer(d),h=function(){l&&(l.dispose(),l=null)},f=function(){m&&m.trigger(h)},g=function(){m&&m.cancel()},v=function(){g(),m=null,h()};return Object.keys(e.prototype).filter(function(e){return"constructor"!==e}).forEach(function(r){u[r]=function(){if(g(),!l){var u=c&&c.args?c.args:[],d=void 0;if(c&&(d=Object.create(null),c.verbose&&(d.verbose=!0),c.env)){var m=i.clone(process.env);d.env=i.mixin(m,c.env)}var v=a.fork(t,u,d);l=s(e,v);var y=function(){return v.kill()};process.once("exit",y),v.on("error",function(e){console.warn("Service "+o.basename(t)+" errored with "+e)}),v.on("exit",function(e,n){process.removeListener("exit",y),p.forEach(function(e){return e.cancel()}),p=[],e&&"SIGTERM"!==n&&(console.warn("Service "+o.basename(t)+" crashed with exit code "+e),g(),h())})}var _=l.service[r].apply(l.service,arguments),b=new n.Promise(function(e,t,n){_.then(function(t){e(t)},function(e){t(e)},n).done(function(){p.splice(p.indexOf(b),1),f()})},function(){return _.cancel()});return p.push(b),b}}),{service:u,dispose:v}}var l;!function(e){e[e.Common=0]="Common",e[e.Cancel=1]="Cancel"}(l||(l={}));var p;!function(e){e[e.Initialize=0]="Initialize",e[e.Success=1]="Success",e[e.Progress=2]="Progress",e[e.Error=3]="Error"}(p||(p={}));var d;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Idle=1]="Idle"}(d||(d={}));var m=function(){function e(e,t){var n=this;this.protocol=e,this.service=t,this.activeRequestPromises=Object.create(null),this.protocol.onMessage(function(e){return n.onMessage(e)}),this.protocol.send({type:p.Initialize})}return e.prototype.onMessage=function(e){switch(e.type){case l.Common:this.onCommonRequest(e);break;case l.Cancel:this.onCancelRequest(e)}},e.prototype.onCommonRequest=function(e){var t=this,n=this.service[e.name].apply(this.service,e.arguments);this.activeRequestPromises[e.id]=n.then(function(n){t.protocol.send({id:e.id,type:p.Success,data:n}),delete t.activeRequestPromises[e.id]},function(n){t.protocol.send({id:e.id,type:p.Error,data:n}),delete t.activeRequestPromises[e.id]},function(n){t.protocol.send({id:e.id,type:p.Progress,data:n})})},e.prototype.onCancelRequest=function(e){var t=this.activeRequestPromises[e.id];t&&(t.cancel(),delete this.activeRequestPromises[e.id])},e.prototype.dispose=function(){var e=this;Object.keys(this.activeRequestPromises).forEach(function(t){e.activeRequestPromises[t].cancel()}),this.activeRequestPromises=null},e}(),h=function(){function e(e){var t=this;this.protocol=e,this.state=d.Uninitialized,this.bufferedRequests=[],this.activeRequestHandlers=Object.create(null),this.lastRequestId=0,this.protocol.onMessage(function(e){return t.onMessage(e)})}return e.prototype.request=function(e){var t={id:this.lastRequestId++,type:l.Common,name:e,arguments:Array.prototype.slice.call(arguments,1)};return this.state===d.Uninitialized?this.bufferRequest(t):this.doRequest(t)},e.prototype.doRequest=function(e){var t=this;return new n.Promise(function(n,r,i){t.activeRequestHandlers[e.id]=function(o){switch(o.type){case p.Success:delete t.activeRequestHandlers[e.id],n(o.data);break;case p.Error:delete t.activeRequestHandlers[e.id],r(o.data);break;case p.Progress:i(o.data)}};try{t.protocol.send(e)}catch(o){}},function(){try{t.protocol.send({id:e.id,type:l.Cancel})}catch(n){}})},e.prototype.bufferRequest=function(e){var t=this;return new n.Promise(function(n,r,i){t.bufferedRequests.push(e),e.flush=function(){e.flush=null,t.doRequest(e).done(n,r,i)}},function(){if(e.flush=null,t.state===d.Uninitialized){var n=t.bufferedRequests.indexOf(e);-1!==n&&t.bufferedRequests.splice(n,1)}})},e.prototype.onMessage=function(e){if(this.state===d.Uninitialized&&e.type===p.Initialize)return this.state=d.Idle,this.bufferedRequests.forEach(function(e){return e.flush&&e.flush()}),this.bufferedRequests=null,void 0;var t=this.activeRequestHandlers[e.id];t&&t(e)},e}();t.run=c,t.createService=u}),define("vs/base/common/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 a(e,t,n){for(var r=0,i=e.length-1;i>=r;){var o=Math.floor((r+i)/2),a=n(e[o],t);if(0>a)r=o+1;else{if(!(a>0))return o;i=o-1}}return-1}function s(e,t){var n=0,r=e.length;if(0===r)return 0;for(;r>n;){var i=Math.floor((n+r)/2);t(e[i])?r=i:n=i+1}return n}function c(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 a=e[i][o],s=t(a);r.hasOwnProperty(s)||(r[s]=!0,n.push(a))}else for(var i=0,c=e.length;c>i;i++)n.push.apply(n,e[i]);return n}function u(e){return e?e.filter(function(e){return!!e}):e}function l(e,t){return e.indexOf(t)>=0}function p(e,t,n){var r=e[t],i=e[n];e[t]=i,e[n]=r}function d(e,t,n){e.splice(n,0,e.splice(t,1)[0])}function m(e){return!Array.isArray(e)||0===e.length}function h(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 f(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 g(e,t){for(var n=[],r=0;t>r;r++)n.push(e);return n}function v(e,t,n){void 0===n&&(n=function(e,t){return e===t});for(var r=0,i=0,o=Math.min(e.length,t.length);o>i&&n(e[i],t[i]);i++)r++;return r}t.tail=n,t.forEach=r,t.equals=i,t.fill=o,t.binarySearch=a,t.findFirst=s,t.merge=c,t.coalesce=u,t.contains=l,t.swap=p,t.move=d,t.isFalsyOrEmpty=m,t.distinct=h,t.first=f,t.repeat=g,t.commonPrefixLength=v}),define("vs/base/common/marshalling",["require","exports","vs/base/common/objects","vs/base/common/types"],function(e,t,n,r){function i(e){u.push(e)}function o(e){return n.cloneAndChange(e,function(e){if("object"==typeof e){for(var t=0;t<u.length;t++){var n=u[t];if(n.canSerialize(e))return n.serialize(e,o)}if(l&&l.canSerialize(e))return l.serialize(e,o)}return void 0})}function a(e){return n.cloneAndChange(e,function(e){if(r.isObject(e)){for(var t=0;t<u.length;t++){var n=u[t];if(n.canDeserialize(e))return n.deserialize(e,a)}if(l&&l.canDeserialize(e))return l.deserialize(e,a)}return void 0})}function s(e,t){void 0===t&&(t=null),l=t;var n=JSON.stringify(o(e));return l=null,n}function c(e,t){void 0===t&&(t=null),l=t;var n=a(JSON.parse(e));return l=null,n}var u=[];t.registerMarshallingContribution=i;var l=null;t.serialize=o,t.deserialize=a,i({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)}}),t.marshallObject=s,t.demarshallObject=c}),define("vs/base/common/uri",["require","exports","vs/base/common/marshalling","vs/base/common/platform"],function(e,t,n,r){function i(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}var o,o=function(){function e(){this._scheme=e._empty,this._authority=e._empty,this._path=e._empty,this._query=e._empty,this._fragment=e._empty}return Object.defineProperty(e.prototype,"scheme",{get:function(){return this._scheme},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"authority",{get:function(){return this._authority},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"query",{get:function(){return this._query},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fragment",{get:function(){return this._fragment},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fsPath",{get:function(){if(!this._fsPath){var t;t=this._authority&&"file"===this.scheme?"//"+this._authority+this._path:e._driveLetterPath.test(this._path)?this._path[1].toLowerCase()+this._path.substr(2):this._path,r.isWindows&&(t=t.replace(/\//g,"\\")),this._fsPath=t}return this._fsPath},enumerable:!0,configurable:!0}),e.prototype.with=function(t,n,r,i,o){var a=new e;return a._scheme=t||this.scheme,a._authority=n||this.authority,a._path=r||this.path,a._query=i||this.query,a._fragment=o||this.fragment,e._validate(a),a},e.prototype.withScheme=function(e){return this.with(e,void 0,void 0,void 0,void 0)},e.prototype.withAuthority=function(e){return this.with(void 0,e,void 0,void 0,void 0)},e.prototype.withPath=function(e){return this.with(void 0,void 0,e,void 0,void 0)},e.prototype.withQuery=function(e){return this.with(void 0,void 0,void 0,e,void 0)},e.prototype.withFragment=function(e){return this.with(void 0,void 0,void 0,void 0,e)},e.parse=function(t){var n=e._parse(t);return n=n.with(void 0,decodeURIComponent(n.authority),decodeURIComponent(n.path),decodeURIComponent(n.query),decodeURIComponent(n.fragment))},e.file=function(t){t=t.replace(/\\/g,"/"),t=t.replace(/%/g,"%25"),t=t.replace(/#/g,"%23"),t=t.replace(/\?/g,"%3F"),t=e._driveLetter.test(t)?"/"+t:t;var n=e._parse(t);if(n.scheme||n.fragment||n.query)throw new Error;return n=n.with("file",void 0,decodeURIComponent(n.path),void 0,void 0)},e._parse=function(t){var n=new e,r=e._regexp.exec(t);return r&&(n._scheme=r[2]||n._scheme,n._authority=r[4]||n._authority,n._path=r[5]||n._path,n._query=r[7]||n._query,n._fragment=r[9]||n._fragment),e._validate(n),n},e.create=function(t,n,r,i,o){return(new e).with(t,n,r,i,o)},e._validate=function(e){if(e.authority&&e.path&&"/"!==e.path[0])throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');if(!e.authority&&0===e.path.indexOf("//"))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')},e.prototype.toString=function(){if(!this._formatted){var t=[];if(this._scheme&&(t.push(this._scheme),t.push(":")),(this._authority||"file"===this._scheme)&&t.push("//"),this._authority){var n,r=this._authority;r=r.toLowerCase(),n=r.indexOf(":"),-1===n?t.push(i(r)):(t.push(i(r.substr(0,n))),t.push(r.substr(n)))}if(this._path){var o,a=this._path;e._driveLetterPath.test(a)?a="/"+a[1].toLowerCase()+a.substr(2):e._driveLetter.test(a)&&(a=a[0].toLowerCase()+a.substr(1)),o=a.split("/");for(var s=0,c=o.length;c>s;s++)o[s]=i(o[s]);t.push(o.join("/"))}this._fragment&&(t.push("#"),t.push(i(this._fragment))),this._query&&(t.push("?"),t.push(i(this._query))),this._formatted=t.join("")}return this._formatted},e.prototype.toJSON=function(){return this.toString()},e.prototype._toSerialized=function(){return{$isURI:!0,$value:this.toString().replace(/URL_MARSHAL_REMOVE.*$/,"")}},e._empty="",e._regexp=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,e._driveLetterPath=/^\/[a-zA-z]:/,e._driveLetter=/^[a-zA-z]:/,e}();return function(e){function t(t){return t instanceof e?!0:t?"string"!=typeof t.scheme?!1:"string"!=typeof t.authority?!1:"string"!=typeof t.fsPath?!1:"string"!=typeof t.query?!1:"string"!=typeof t.fragment?!1:"function"!=typeof t.with?!1:"function"!=typeof t.withScheme?!1:"function"!=typeof t.withAuthority?!1:"function"!=typeof t.withPath?!1:"function"!=typeof t.withQuery?!1:"function"!=typeof t.withFragment?!1:"function"!=typeof t.toString?!1:"function"!=typeof t.toJSON?!1:!0:!1}e.isURI=t}(o||(o={})),n.registerMarshallingContribution({canSerialize:function(e){return o.isURI(e)},serialize:function(e){return e._toSerialized()},canDeserialize:function(e){return e.$isURI},deserialize:function(e){return o.parse(e.$value)}}),o}),define("vs/base/common/assert",["require","exports"],function(e,t){function n(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}t.ok=n}),define("vs/base/common/paths",["require","exports","vs/base/common/platform"],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 a=0,s=r.length;s>a;a++)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?t.nativeSep:t.sep)}function o(e){function t(){return"."===n||"/"===n||"\\"===n?(n=void 0,r=!0):n=a(n),{value:n,done:r}}var n=e,r=!1;return{next:t}}function a(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 c(e){e=s(e);var t=~e.lastIndexOf(".");return t?e.substring(~t):""}function u(e){if(!e)return 0;if(e=e.replace(/\/|\\/g,"/"),"/"===e[0])return"/"!==e[1]?1:2;if(":"===e[1])return"/"===e[2]?3:2;if(0===e.indexOf("file:///"))return 8;var t=e.indexOf("://");return-1!==t?t+3:0}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n,r=u(e[0]);n=e[0].substr(0,r),e[0]=e[0].substr(r);for(var i=[],o=/[\\\/]$/.test(e[e.length-1]),a=0;a<e.length;a++)i.push.apply(i,e[a].split(/\/|\\/));for(var a=0;a<i.length;a++){var s=i[a];"."===s||0===s.length?(i.splice(a,1),a-=1):".."===s&&i[a-1]&&".."!==i[a-1]&&(i.splice(a-1,2),a-=2)}o&&i.push("");var c=i.join("/");return n&&(c=n.replace(/\/|\\/g,"/")+c),c}function p(e){return n.isWindows&&e?(e=this.normalize(e,!0),e[0]===t.nativeSep&&e[1]===t.nativeSep):!1}function d(e){return e&&"/"===e[0]}function m(e,n){return d(n?e:i(e))?e:t.sep+e}function h(e){return e&&e.length>1&&"."===e[0]}function f(e,t){var n=y(i(e)),r=y(i(t)),o=r.length;r[o-1]||(o-=1);for(var a=0;o>a;a++)if(n[a]!==r[a])return!1;return!0}t.sep="/",t.nativeSep=n.isWindows?"\\":"/",t.relative=r,t.normalize=i,t.dirnames=o,t.dirname=a,t.basename=s,t.extname=c,t.join=l,t.isUNC=p,t.isAbsolute=d,t.makeAbsolute=m,t.isRelative=h,t.isEqualOrParent=f;var g=function(e){return e.split(t.sep)},v=function(e){return e.split(t.sep).map(function(e){return e.toLowerCase()})},y=n.isLinux?g:v});var __extends=this&&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/common/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,r,i){e.call(this,i),this.key=t,this.oldValue=n,this.newValue=r}return __extends(t,e),t}(n);t.PropertyChangeEvent=r;var i=function(e){function t(t,n){e.call(this,n),this.element=t}return __extends(t,e),t}(n);t.ViewerEvent=i,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",CHANGE:"change",DISPOSE:"dispose"}}),define("vs/base/common/mime",["require","exports","vs/base/common/paths","vs/base/common/types","vs/base/common/strings"],function(e,t,n,r,i){function o(e){void 0===e&&(e=!0);var n=function(t){return e?/^\./.test(t):!0},r=function(e){return e.replace(/^\./,"")},i=[];i=i.concat(Object.keys(t.fileNameToTextMime)),i=i.concat(Object.keys(t.knownTextMimes)),i=i.concat(Object.keys(d)),i=i.filter(n).map(r),i.sort();for(var o=[],a=null,s=null,c=[],u=function(){c.length>0&&o.push("'"+c.join("', '")+"'")},l=0,p=i.length;p>l;l++){var m=i[l];if(0!==m.length&&m!==s){var h=m.charAt(0);a!==h&&(u(),a=h,c=[]),c.push(m),s=m}}return u(),o.join(",\n")}function a(e,t){e&&t&&(d[e]=t)}function s(e,t){e&&t&&m.push({regexp:e,mime:t})}function c(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 u(e,r){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();var o=n.basename(e),a=n.extname(e);for(var s in d){var c=s.toLowerCase();if(o===c||"."===s[0]&&i.endsWith(o,c)){var u=[d[s]];return u.push(t.MIME_TEXT),u}}if(r&&i.startsWithUTF8BOM(r)&&(r=r.substr(1)),r&&r.length>0)for(var l=0;l<m.length;++l){var p=r.match(m[l].regexp);if(p&&p.length>0&&p[0].length===r.length)return[m[l].mime,t.MIME_TEXT]}if(t.fileNameToTextMime[o]){var u=[t.fileNameToTextMime[o]];return u.push(t.MIME_TEXT),u}if(t.knownTextMimes[a]){var u=[t.knownTextMimes[a]];return t.knownTextMimes[a]!==t.MIME_TEXT&&u.push(t.MIME_TEXT),u}if(t.knownBinaryMimes[a]){var u=[t.knownBinaryMimes[a]];return t.knownBinaryMimes[a]!==t.MIME_BINARY&&u.push(t.MIME_BINARY),u}return[t.MIME_UNKNOWN]}function l(e){return e?"string"==typeof e?e===t.MIME_BINARY||e===t.MIME_TEXT||e===t.MIME_UNKNOWN:1===e.length&&l(e[0]):!0}function p(e,n){for(var r in d){var i=d[r];if(i===e)return n+r}for(var r in t.knownTextMimes)if(t.knownTextMimes.hasOwnProperty(r)){var i=t.knownTextMimes[r];if(i===e)return n+r}for(var r in t.knownBinaryMimes)if(t.knownBinaryMimes.hasOwnProperty(r)){var i=t.knownBinaryMimes[r];if(i===e)return n+r}return null}t.MIME_TEXT="text/plain",t.MIME_BINARY="application/octet-stream",t.MIME_UNKNOWN="application/unknown",t.generateKnownFilenames=o,t.fileNameToTextMime={makefile:"text/x-makefile"},t.knownTextMimes={".dtd":"application/xml-dtd",".dot":"text/x-dot"},t.knownBinaryMimes={".bmp":"image/bmp",".gif":"image/gif",".jpg":"image/jpg",".jpeg":"image/jpg",".jpe":"image/jpg",".png":"image/png",".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",".movie":"video/x-sgi-movie",".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",".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",".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",".ai":"application/postscript",".swf":"application/x-shockwave-flash",".aif":"audio/x-aiff",".odt":"application/vnd.oasis.opendocument.text",".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",".nupkg":"application/octet-stream",".cspkg":"application/octet-stream",".pyc":"application/octet-stream",".pyo":"application/octet-stream"};var d=Object.create(null);t.registerTextMimeByFilename=a;var m=[];t.registerTextMimeByFirstLine=s,t.isBinaryMime=c,t.guessMimeTypes=u,t.isUnspecific=l,t.suggestFilename=p}),define("vs/platform/instantiation/common/instantiation",["require","exports"],function(e,t){function n(e){var t=function(t,n,r){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({serviceId:e,index:r}):(t[i.DI_DEPENDENCIES]=[{serviceId:e,index:r}],t[i.DI_TARGET]=t)};return t[i.DI_PROVIDES]=e,t}function r(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push({serviceId:i.getServiceId(o)})}return function(e){var t=e[i.DI_DEPENDENCIES_USES];return t?t.push.apply(t,n):e[i.DI_DEPENDENCIES_USES]=n,e}}var i;!function(e){function t(t){return t[e.DI_PROVIDES]}function n(t){var n=t[e.DI_DEPENDENCIES],r=t[e.DI_DEPENDENCIES_USES];return n?r?n.slice(0).concat(r):n:r}e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.DI_DEPENDENCIES_USES="$di$dependencies_uses",e.DI_PROVIDES="$di$provides_service",e.getServiceId=t,e.getServiceDependencies=n}(i=t._util||(t._util={})),t.IInstantiationService=n("instantiationService"),t.createDecorator=n,t.Uses=r,t.INullService=n("nullService")});var __extends=this&&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/common/files",["require","exports","vs/base/common/assert","vs/base/common/paths","vs/base/common/uri","vs/base/common/types","vs/base/common/strings","vs/base/common/events","vs/base/common/mime","vs/platform/instantiation/common/instantiation"],function(e,t,n,r,i,o,a,s,c,u){t.IFileService=u.createDecorator("fileService"),function(e){e[e.UPDATED=0]="UPDATED",e[e.ADDED=1]="ADDED",e[e.DELETED=2]="DELETED"}(t.FileChangeType||(t.FileChangeType={}));var l=t.FileChangeType;t.EventType={FILE_CHANGES:"files:fileChanges"};var p=function(e){function t(t){e.call(this),this._changes=t}return __extends(t,e),Object.defineProperty(t.prototype,"changes",{get:function(){return this._changes},enumerable:!0,configurable:!0}),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===l.DELETED?e.some(function(e){return e?r.isEqualOrParent(e.fsPath,n.resource.fsPath):!1}):e.some(function(e){return e?e.fsPath===n.resource.fsPath:!1})}):!1},t.prototype.getAdded=function(){return this.getOfType(l.ADDED)},t.prototype.gotAdded=function(){return this.hasType(l.ADDED)},t.prototype.getDeleted=function(){return this.getOfType(l.DELETED)},t.prototype.gotDeleted=function(){return this.hasType(l.DELETED)},t.prototype.getUpdated=function(){return this.getOfType(l.UPDATED)},t.prototype.gotUpdated=function(){return this.hasType(l.UPDATED)},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}(s.Event);t.FileChangesEvent=p,function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ANY=2]="ANY"}(t.StatType||(t.StatType={}));var d=t.StatType,m=function(){function e(e,t,a,s,u,l,p){n.ok(!s||a,"Only a directory can have children"),this.resource="string"==typeof e?i.parse(e):e,this.path=r.makeAbsolute(r.normalize(t)),o.isString(u)?this.name=u:this.path&&(this.name=r.basename(this.path)),this.isDirectory=!!a,this.hasChildren=a&&s,this.mime=a?void 0:c.guessMimeTypes(this.path).join(", "),this.isDirectoryResolved=!1,this.etag=p,this.mtime=l,this.isDirectory&&(this.children=[])}return e.fromRAW=function(t,n,i){var a=new e(t.resource,t.path,t.isDirectory,t.hasChildren,t.name,t.mtime,t.etag);if(n&&n instanceof e?n.addChild(a):o.isString(n)&&(a.path=r.makeAbsolute(r.normalize(n))),a.isDirectory&&(a.children=[],a.isDirectoryResolved=!!t.children||!!i&&i.some(function(e){return r.isEqualOrParent(e,a.path)}),t.children))for(var s=0,c=t.children.length;c>s;s++)e.fromRAW(t.children[s],a,i);return a},e.prototype.clone=function(){var t=new e(i.parse(this.resource.toString()),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=d.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 a=this.children[i];if(!(r===d.FILE&&a.isDirectory||r===d.FOLDER&&!a.isDirectory)){if(a.name===e)return!0;if(t&&a.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.resource=i.file(r.join(this.parent.resource.fsPath,this.name)),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=a.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()?a.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=m,function(e){e[e.FILE_IS_BINARY=0]="FILE_IS_BINARY",e[e.FILE_IS_DIRECTORY=1]="FILE_IS_DIRECTORY",e[e.FILE_NOT_FOUND=2]="FILE_NOT_FOUND",e[e.FILE_NOT_MODIFIED_SINCE=3]="FILE_NOT_MODIFIED_SINCE",e[e.FILE_MODIFIED_SINCE=4]="FILE_MODIFIED_SINCE",e[e.FILE_MOVE_CONFLICT=5]="FILE_MOVE_CONFLICT",e[e.FILE_READ_ONLY=6]="FILE_READ_ONLY",e[e.FILE_TOO_LARGE=7]="FILE_TOO_LARGE"}(t.FileOperationResult||(t.FileOperationResult={}));t.FileOperationResult}),define("vs/workbench/services/files/node/watcher/common",["require","exports","vs/base/common/arrays","vs/base/common/uri","vs/platform/files/common/files"],function(e,t,n,r,i){function o(e){return e=n.distinct(e,function(e){return e.type+e.path}),new i.FileChangesEvent(e.map(function(e){return{type:e.type,resource:r.file(e.path)}}))}t.toFileChangesEvent=o}),define("vs/workbench/services/files/node/watcher/unix/watcherService",["require","exports","vs/base/common/winjs.base","vs/base/node/service","vs/base/common/types","vs/base/common/async","vs/base/common/arrays","vs/base/common/uri","vs/platform/files/common/files","vs/workbench/services/files/node/watcher/common"],function(e,t,n,r,i,o,a,s,c,u){var l=function(){function e(){}return e.prototype.watch=function(){throw new Error("not implemented")},e}();t.WatcherService=l;var p=function(){function t(e,t,n,r,i,o){this.basePath=e,this.ignored=t,this.eventEmitter=n,this.errorLogger=r,this.delay=i,this.limitBeforeFlush=o}return t.prototype.startWatching=function(){var t=this,p=[],d=new o.ThrottledDelayer(this.delay);return this.watcherServiceConnection=r.createService(l,s.parse(e.toUrl("bootstrap")).fsPath,{env:{AMD_ENTRYPOINT:"vs/workbench/services/files/node/watcher/unix/watcherApp"}}),this.watcherServiceConnection.service.watch({basePath:this.basePath,ignored:this.ignored}).then(null,function(e){return e instanceof Error&&"Canceled"===e.name&&"Canceled"===e.message?void 0:n.Promise.wrapError(e)},function(e){if(i.isString(e))return t.errorLogger("[chokidar error]: "+e),void 0;var r=e;p.push(r),d.trigger(function(){var e=p;return p=[],e&&(e=a.coalesce(e)).length>0&&t.eventEmitter.emit(c.EventType.FILE_CHANGES,u.toFileChangesEvent(e)),n.Promise.as(null)},p.length>=t.limitBeforeFlush?0:t.delay)}).done(function(){t.isDisposed||(d.cancel(),d=null,p=null,t.startWatching())},this.errorLogger),function(){t.watcherServiceConnection.dispose(),t.isDisposed=!0}},t}();t.FileWatcher=p});var __extends=this&&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/workbench/services/files/node/watcher/unix/chokidarWatcherService",["require","exports","chokidar","fs","graceful-fs","vs/base/common/winjs.base","vs/workbench/services/files/node/watcher/unix/watcherService"],function(e,t,n,r,i,o,a){i.gracefulify(r);var s=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.watch=function(e){var t={ignoreInitial:!0,ignorePermissionErrors:!0,followSymlinks:!0,ignored:e.ignored},r=n.watch(e.basePath,t);return new o.Promise(function(t,n,i){r.on("all",function(t,n){if(!(n.indexOf(e.basePath)<0)){var r=null;"add"===t||"addDir"===t?r={type:1,path:n}:"change"===t?r={type:0,path:n}:("unlink"===t||"unlinkDir"===t)&&(r={type:2,path:n}),r&&i(r)}}),r.on("error",function(e){e&&i(e.toString())})},function(){r.close()})},t}(a.WatcherService);return s}),define("vs/workbench/services/files/node/watcher/unix/watcherApp",["require","exports","vs/base/node/service","vs/workbench/services/files/node/watcher/unix/chokidarWatcherService"],function(e,t,n,r){n.run(new r)});