@git-temporal/git-temporal-react
Version:
<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
1 lines • 642 kB
JavaScript
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=4)}([function(e,t,n){"use strict";(function(e,r){var i;n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s})),function(){var t=Object.create(null);t["WinJS/Core/_WinJS"]={};var n=function(e,n,r){var i={},o=!1,s=n.map((function(e){return"exports"===e?(o=!0,i):t[e]})),a=r.apply({},s);t[e]=o?i:a};n("WinJS/Core/_Global",[],(function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==e?e:{}})),n("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],(function(e){var t=!!e.Windows;var n=null;return{hasWinRT:t,markSupportedForProcessing:function(e){return e.supportedForProcessing=!0,e},_setImmediate:function(t){null===n&&(n=e.setImmediate?e.setImmediate.bind(e):void 0!==r&&"function"==typeof r.nextTick?r.nextTick.bind(r):e.setTimeout.bind(e)),n(t)}}})),n("WinJS/Core/_WriteProfilerMark",["WinJS/Core/_Global"],(function(e){return e.msWriteProfilerMark||function(){}})),n("WinJS/Core/_Base",["WinJS/Core/_WinJS","WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_WriteProfilerMark"],(function(e,t,n,r){function i(e,t,n){var r,i,o,s=Object.keys(t),a=Array.isArray(e);for(i=0,o=s.length;i<o;i++){var l=s[i],c=95!==l.charCodeAt(0),h=t[l];!h||"object"!=typeof h||void 0===h.value&&"function"!=typeof h.get&&"function"!=typeof h.set?c?a?e.forEach((function(e){e[l]=h})):e[l]=h:(r=r||{})[l]={value:h,enumerable:c,configurable:!0,writable:!0}:(void 0===h.enumerable&&(h.enumerable=c),n&&h.setName&&"function"==typeof h.setName&&h.setName(n+"."+l),(r=r||{})[l]=h)}r&&(a?e.forEach((function(e){Object.defineProperties(e,r)})):Object.defineProperties(e,r))}return function(){var n=e;function o(n,r){var i=n||{};if(r){var o=r.split(".");i===t&&"WinJS"===o[0]&&(i=e,o.splice(0,1));for(var s=0,a=o.length;s<a;s++){var l=o[s];i[l]||Object.defineProperty(i,l,{value:{},writable:!1,enumerable:!0,configurable:!0}),i=i[l]}}return i}function s(e,t,n){var r=o(e,t);return n&&i(r,n,t||"<ANONYMOUS>"),r}n.Namespace||(n.Namespace=Object.create(Object.prototype));var a=1,l=2,c=3;Object.defineProperties(n.Namespace,{defineWithParent:{value:s,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return s(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,i=a;return{setName:function(e){t=e},get:function(){switch(i){case c:return n;case a:i=l;try{r("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{r("WinJS.Namespace._lazy:"+t+",StopTM"),i=a}return e=null,i=c,n;case l:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(i){case l:throw"Illegal: reentrancy on initialization";default:i=c,n=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,n,r){var s=[e],a=null;return n&&(a=o(t,n),s.push(a)),i(s,r,n||"<ANONYMOUS>"),a},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,r){return e=e||function(){},n.markSupportedForProcessing(e),t&&i(e.prototype,t),r&&i(e,r),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,r,o,s){if(e){r=r||function(){};var a=e.prototype;return r.prototype=Object.create(a),n.markSupportedForProcessing(r),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,configurable:!0,enumerable:!0}),o&&i(r.prototype,o),s&&i(r,s),r}return t(r,o,s)},mix:function(e){var t,n;for(e=e||function(){},t=1,n=arguments.length;t<n;t++)i(e.prototype,arguments[t]);return e}})}(),{Namespace:e.Namespace,Class:e.Class}})),n("WinJS/Core/_ErrorFromName",["WinJS/Core/_Base"],(function(e){var t=e.Class.derive(Error,(function(e,t){this.name=e,this.message=t||e}),{},{supportedForProcessing:!1});return e.Namespace.define("WinJS",{ErrorFromName:t}),t})),n("WinJS/Core/_Events",["exports","WinJS/Core/_Base"],(function(e,t){function n(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}}var r=t.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;i<o;i++){var s=r[i];if(s.useCapture===n&&s.listener===t)return}r.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){for(var i=new r(e,t,this),o=0,s=(n=n.slice(0,n.length)).length;o<s&&!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;i<o;i++){var s=r[i];if(s.listener===t&&s.useCapture===n){r.splice(i,1),0===r.length&&delete this._listeners[e];break}}}};t.Namespace._moduleDefine(e,"WinJS.Utilities",{_createEventProperty:n,createEventProperties:function(){for(var e={},t=0,r=arguments.length;t<r;t++){var i=arguments[t];e["on"+i]=n(i)}return e},eventMixin:i})})),n("WinJS/Core/_Trace",["WinJS/Core/_Global"],(function(e){function t(e){return e}return{_traceAsyncOperationStarting:e.Debug&&e.Debug.msTraceAsyncOperationStarting&&e.Debug.msTraceAsyncOperationStarting.bind(e.Debug)||t,_traceAsyncOperationCompleted:e.Debug&&e.Debug.msTraceAsyncOperationCompleted&&e.Debug.msTraceAsyncOperationCompleted.bind(e.Debug)||t,_traceAsyncCallbackStarting:e.Debug&&e.Debug.msTraceAsyncCallbackStarting&&e.Debug.msTraceAsyncCallbackStarting.bind(e.Debug)||t,_traceAsyncCallbackCompleted:e.Debug&&e.Debug.msTraceAsyncCallbackCompleted&&e.Debug.msTraceAsyncCallbackCompleted.bind(e.Debug)||t}})),n("WinJS/Promise/_StateMachine",["WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_Base","WinJS/Core/_ErrorFromName","WinJS/Core/_Events","WinJS/Core/_Trace"],(function(e,t,n,r,i,o){e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var s=new(n.Class.mix(n.Class.define(null,{},{supportedForProcessing:!1}),i.eventMixin));s._listeners={};var a=!1,l={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};l.all=l.promise|l.thenPromise|l.errorPromise|l.exceptionPromise|l.completePromise;var c,h,d,u,m,p,f,g,b,y,w=1;function v(){}c={name:"created",enter:function(e){e._setState(h)},cancel:v,done:v,then:v,_completed:v,_error:v,_notify:v,_progress:v,_setCompleteValue:v,_setErrorValue:v},h={name:"working",enter:v,cancel:function(e){e._setState(m)},done:T,then:U,_completed:k,_error:I,_notify:v,_progress:N,_setCompleteValue:z,_setErrorValue:D},d={name:"waiting",enter:function(e){var t=e._value;if(t instanceof j&&t._state!==y&&t._state!==g)L(t,{promise:e});else{var n=function(r){t._errorId?e._chainedError(r,t):(O(e,r,S,t,n),e._error(r))};n.handlesOnError=!0,t.then(e._completed.bind(e),n,e._progress.bind(e))}},cancel:function(e){e._setState(u)},done:T,then:U,_completed:k,_error:I,_notify:v,_progress:N,_setCompleteValue:z,_setErrorValue:D},u={name:"waiting_canceled",enter:function(e){e._setState(p);var t=e._value;t.cancel&&t.cancel()},cancel:v,done:T,then:U,_completed:k,_error:I,_notify:v,_progress:N,_setCompleteValue:z,_setErrorValue:D},m={name:"canceled",enter:function(e){e._setState(p),e._cancelAction()},cancel:v,done:T,then:U,_completed:k,_error:I,_notify:v,_progress:N,_setCompleteValue:z,_setErrorValue:D},p={name:"canceling",enter:function(e){var t=new Error("Canceled");t.name=t.message,e._value=t,e._setState(b)},cancel:v,done:v,then:v,_completed:v,_error:v,_notify:v,_progress:v,_setCompleteValue:v,_setErrorValue:v},f={name:"complete_notify",enter:function(e){if(e.done=K.prototype.done,e.then=K.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(g)},cancel:v,done:null,then:null,_completed:v,_error:v,_notify:A,_progress:v,_setCompleteValue:v,_setErrorValue:v},g={name:"success",enter:function(e){e.done=K.prototype.done,e.then=K.prototype.then,e._cleanupAction()},cancel:v,done:null,then:null,_completed:v,_error:v,_notify:A,_progress:v,_setCompleteValue:v,_setErrorValue:v},b={name:"error_notify",enter:function(e){if(e.done=V.prototype.done,e.then=V.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(y)},cancel:v,done:null,then:null,_completed:v,_error:v,_notify:P,_progress:v,_setCompleteValue:v,_setErrorValue:v},y={name:"error",enter:function(e){e.done=V.prototype.done,e.then=V.prototype.then,e._cleanupAction()},cancel:v,done:null,then:null,_completed:v,_error:v,_notify:P,_progress:v,_setCompleteValue:v,_setErrorValue:v};var x=n.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,r){if(this.then===e)return this._state.then(this,t,n,r);this.then(t,n,r)},_chainedError:function(e,t){var n=this._state._error(this,e,_,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,F);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,_,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,E);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1});function k(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?d:f,e._value=t,e._setState(n)}function C(e,t,n,r,i,o){return{exception:e,error:t,promise:n,handler:o,id:r,parent:i}}function S(e,t,n,r){var i=n._isException;return C(i?t:null,i?null:t,e,n._errorId,n,r)}function _(e,t,n){var r=n._isException,i=n._errorId;return R(e,i,r),C(r?t:null,r?null:t,e,i,n)}function F(e,t){var n=++w;return R(e,n),C(null,t,e,n)}function E(e,t){var n=++w;return R(e,n,!0),C(t,null,e,n)}function T(e,t,n,r){L(e,{c:t,e:n,p:r,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.done")})}function I(e,t,n,r){e._value=t,O(e,t,n,r),e._setState(b)}function A(t,n){var r,i,s=t._value,a=t._listeners;if(a)for(t._listeners=null,r=0,i=Array.isArray(a)?a.length:1;r<i;r++){var l=1===i?a:a[r],c=l.c,h=l.promise;if(o._traceAsyncOperationCompleted(l.asyncOpID,e.Debug&&e.Debug.MS_ASYNC_OP_STATUS_SUCCESS),h){o._traceAsyncCallbackStarting(l.asyncOpID);try{h._setCompleteValue(c?c(s):s)}catch(e){h._setExceptionValue(e)}finally{o._traceAsyncCallbackCompleted()}h._state!==d&&h._listeners&&n.push(h)}else K.prototype.done.call(t,c)}}function P(t,n){var r,i,s=t._value,a=t._listeners;if(a)for(t._listeners=null,r=0,i=Array.isArray(a)?a.length:1;r<i;r++){var l=1===i?a:a[r],c=l.e,h=l.promise,u=e.Debug&&(s&&"Canceled"===s.name?e.Debug.MS_ASYNC_OP_STATUS_CANCELED:e.Debug.MS_ASYNC_OP_STATUS_ERROR);if(o._traceAsyncOperationCompleted(l.asyncOpID,u),h){var m=!1;try{c?(o._traceAsyncCallbackStarting(l.asyncOpID),m=!0,c.handlesOnError||O(h,s,S,t,c),h._setCompleteValue(c(s))):h._setChainedErrorValue(s,t)}catch(e){h._setExceptionValue(e)}finally{m&&o._traceAsyncCallbackCompleted()}h._state!==d&&h._listeners&&n.push(h)}else V.prototype.done.call(t,null,c)}}function O(e,t,n,r,i){if(s._listeners.error){if(t instanceof Error&&"Canceled"===t.message)return;s.dispatchEvent("error",n(e,t,r,i))}}function N(e,t){var n,r,i=e._listeners;if(i)for(n=0,r=Array.isArray(i)?i.length:1;n<r;n++){var o=1===r?i:i[n],s=o.p;if(s)try{s(t)}catch(e){}o.c||o.e||!o.promise||o.promise._progress(t)}}function L(e,t){var n=e._listeners;n?(n=Array.isArray(n)?n:[n]).push(t):n=t,e._listeners=n}function R(e,t,n){e._isException=n||!1,e._errorId=t}function D(e,t,n,r){e._value=t,O(e,t,n,r),e._setState(y)}function z(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?d:g,e._value=t,e._setState(n)}function U(e,t,n,r){var i=new j(e);return L(e,{promise:i,c:t,e:n,p:r,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.then")}),i}var M,j=n.Class.derive(x,(function(e){a&&(!0===a||a&l.thenPromise)&&(this._stack=q._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=n.Class.define((function(e){a&&(!0===a||a&l.errorPromise)&&(this._stack=q._getStack()),this._value=e,O(this,e,F)}),{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||O(null,n,S,this,t);var r=t(n);return void(r&&"object"==typeof r&&"function"==typeof r.done&&r.done())}catch(e){n=e}n instanceof Error&&"Canceled"===n.message||q._doneHandler(n)},then:function(e,t){if(!t)return this;var n,r=this._value;try{t.handlesOnError||O(null,r,S,this,t),n=new K(t(r))}catch(e){n=e===r?this:new B(e)}return n}},{supportedForProcessing:!1}),B=n.Class.derive(V,(function(e){a&&(!0===a||a&l.exceptionPromise)&&(this._stack=q._getStack()),this._value=e,O(this,e,E)}),{},{supportedForProcessing:!1}),K=n.Class.define((function(e){if(a&&(!0===a||a&l.completePromise)&&(this._stack=q._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var t=new j(null);return t._setCompleteValue(e),t}this._value=e}),{cancel:function(){},done:function(e){if(e)try{var t=e(this._value);t&&"object"==typeof t&&"function"==typeof t.done&&t.done()}catch(e){q._doneHandler(e)}},then:function(e){try{var t=e?e(this._value):this._value;return t===this._value?this:new K(t)}catch(e){return new B(e)}}},{supportedForProcessing:!1});var q=n.Class.derive(x,(function(e,t){a&&(!0===a||a&l.promise)&&(this._stack=q._getStack()),this._oncancel=t,this._setState(c),this._run();try{e(this._completed.bind(this),this._error.bind(this),this._progress.bind(this))}catch(e){this._setExceptionValue(e)}}),{_oncancel:null,_cancelAction:function(){try{if(!this._oncancel)throw new Error("Promise did not implement oncancel");this._oncancel()}catch(e){e.message,e.stack;s.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){s.addEventListener(e,t,n)},any:function(e){return new q((function(t,n){var r=Object.keys(e);0===r.length&&t();var i=0;r.forEach((function(o){q.as(e[o]).then((function(){t({key:o,value:e[o]})}),(function(s){s instanceof Error&&"Canceled"===s.name?++i===r.length&&t(q.cancel):n({key:o,value:e[o]})}))}))}),(function(){Object.keys(e).forEach((function(t){var n=q.as(e[t]);"function"==typeof n.cancel&&n.cancel()}))}))},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new K(e)},cancel:{get:function(){return M=M||new V(new r("Canceled"))}},dispatchEvent:function(e,t){return s.dispatchEvent(e,t)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new q((function(t,n,r){var i=Object.keys(e),o=Array.isArray(e)?[]:{},s=Array.isArray(e)?[]:{},a=0,l=i.length,c=function(e){if(0==--l){var a=Object.keys(o).length;if(0===a)t(s);else{var c=0;i.forEach((function(e){var t=o[e];t instanceof Error&&"Canceled"===t.name&&c++})),c===a?t(q.cancel):n(o)}}else r({Key:e,Done:!0})};i.forEach((function(t){var n=e[t];void 0===n?a++:q.then(n,(function(e){s[t]=e,c(t)}),(function(e){o[t]=e,c(t)}))})),0!==(l-=a)||t(s)}),(function(){Object.keys(e).forEach((function(t){var n=q.as(e[t]);"function"==typeof n.cancel&&n.cancel()}))}))},removeEventListener:function(e,t,n){s.removeEventListener(e,t,n)},supportedForProcessing:!1,then:function(e,t,n,r){return q.as(e).then(t,n,r)},thenEach:function(e,t,n,r){var i=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(o){i[o]=q.as(e[o]).then(t,n,r)})),q.join(i)},timeout:function(n,r){var i,o,s=(i=n,new q((function(n){i?o=e.setTimeout(n,i):t._setImmediate(n)}),(function(){o&&e.clearTimeout(o)})));return r?function(e,t){var n=function(){e.cancel()};return e.then((function(){t.cancel()})),t.then(n,n),t}(s,r):s},wrap:function(e){return new K(e)},wrapError:function(e){return new V(e)},_veryExpensiveTagWithStack:{get:function(){return a},set:function(e){a=e}},_veryExpensiveTagWithStack_tag:l,_getStack:function(){if(e.Debug&&e.Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}},_cancelBlocker:function(e,t){if(!q.is(e))return q.wrap(e);var n,r,i=new q((function(e,t){n=e,r=t}),(function(){n=null,r=null,t&&t()}));return e.then((function(e){n&&n(e)}),(function(e){r&&r(e)})),i}});return Object.defineProperties(q,i.createEventProperties("error")),q._doneHandler=function(e){t._setImmediate((function(){throw e}))},{PromiseStateMachine:x,Promise:q,state_created:c}})),n("WinJS/Promise",["WinJS/Core/_Base","WinJS/Promise/_StateMachine"],(function(e,t){return e.Namespace.define("WinJS",{Promise:t.Promise}),t.Promise})),(i=t["WinJS/Core/_WinJS"]).TPromise=i.Promise,i.PPromise=i.Promise}();var o=i.Promise,s=i.TPromise;i.PPromise}).call(this,n(2),n(3))},function(e,t,n){"use strict";(function(e,r){n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return g})),n.d(t,"d",(function(){return y}));var i=!1,o=!1,s=!1,a=!1,l=!1,c=void 0!==e&&void 0!==e.versions&&void 0!==e.versions.electron&&"renderer"===e.type;if("object"!=typeof navigator||c){if("object"==typeof e){i="win32"===e.platform,o="darwin"===e.platform,s="linux"===e.platform,"en","en";var h=e.env.VSCODE_NLS_CONFIG;if(h)try{var d=JSON.parse(h),u=d.availableLanguages["*"];d.locale,u||"en",d._translationsConfigFile}catch(e){}a=!0}}else{var m=navigator.userAgent;i=m.indexOf("Windows")>=0,o=m.indexOf("Macintosh")>=0,s=m.indexOf("Linux")>=0,l=!0,navigator.language}var p=i,f=l,g="object"==typeof self?self:"object"==typeof r?r:{},b=null;function y(t){return null===b&&(b=g.setImmediate?g.setImmediate.bind(g):void 0!==e&&"function"==typeof e.nextTick?e.nextTick.bind(e):g.setTimeout.bind(g)),b(t)}}).call(this,n(3),n(2))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var l,c=[],h=!1,d=-1;function u(){h&&l&&(h=!1,l.length?c=l.concat(c):d=-1,c.length&&m())}function m(){if(!h){var e=a(u);h=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,h=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function f(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||h||a(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t);var r=n(0),i={};r.b.addEventListener("error",(function(e){var t=e.detail,n=t.id;t.parent?t.handler&&i&&delete i[n]:(i[n]=t,1===Object.keys(i).length&&setTimeout((function(){var e=i;i={},Object.keys(e).forEach((function(t){var n=e[t];n.exception?s(n.exception):n.error&&s(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)}))}),0))}));var o=new(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.emit=function(e){this.listeners.forEach((function(t){t(e)}))},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}());function s(e){l(e)||o.onUnexpectedError(e)}function a(e){return e instanceof Error?{$isError:!0,name:e.name,message:e.message,stack:e.stacktrace||e.stack}:e}function l(e){return e instanceof Error&&"Canceled"===e.name&&"Canceled"===e.message}function c(){var e=new Error("Canceled");return e.name=e.message,e}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Array.isArray(e)?(e.forEach((function(e){return e&&e.dispose()})),[]):0===t.length?e?(e.dispose(),e):void 0:(h(e),h(t),[])}var d=function(){function e(){this._toDispose=[]}return e.prototype.dispose=function(){this._toDispose=h(this._toDispose)},e.prototype._register=function(e){return this._toDispose.push(e),e},e.None=Object.freeze({dispose:function(){}}),e}(),u=(function(){function e(e){this.object=e}e.prototype.dispose=function(){}}(),n(1));var m,p,f=(m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g={done:!0,value:void 0};!function(e){var t={next:function(){return g}};function n(e,t){for(var n=e.next();!n.done;n=e.next())t(n.value)}e.empty=function(){return t},e.fromArray=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.length),{next:function(){return t>=n?g:{done:!1,value:e[t++]}}}},e.from=function(t){return t?Array.isArray(t)?e.fromArray(t):t:e.empty()},e.map=function(e,t){return{next:function(){var n=e.next();return n.done?g:{done:!1,value:t(n.value)}}}},e.filter=function(e,t){return{next:function(){for(;;){var n=e.next();if(n.done)return g;if(t(n.value))return{done:!1,value:n.value}}}}},e.forEach=n,e.collect=function(e){var t=[];return n(e,(function(e){return t.push(e)})),t}}(p||(p={}));(function(e){function t(t,n,r,i){return void 0===n&&(n=0),void 0===r&&(r=t.length),void 0===i&&(i=n-1),e.call(this,t,n,r,i)||this}f(t,e),t.prototype.current=function(){return e.prototype.current.call(this)},t.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},t.prototype.first=function(){return this.index=this.start,this.current()},t.prototype.last=function(){return this.index=this.end-1,this.current()},t.prototype.parent=function(){return null}})(function(){function e(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=e.length),void 0===r&&(r=t-1),this.items=e,this.start=t,this.end=n,this.index=r}return e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},e.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},e}()),function(){function e(e,t){this.iterator=e,this.fn=t}e.prototype.next=function(){return this.fn(this.iterator.next())}}();var b,y=function(e){this.element=e},w=function(){function e(){}return e.prototype.isEmpty=function(){return!this._first},e.prototype.unshift=function(e){return this.insert(e,!1)},e.prototype.push=function(e){return this.insert(e,!0)},e.prototype.insert=function(e,t){var n=this,r=new y(e);if(this._first)if(t){var i=this._last;this._last=r,r.prev=i,i.next=r}else{var o=this._first;this._first=r,r.next=o,o.prev=r}else this._first=r,this._last=r;return function(){for(var e=n._first;e instanceof y;){if(e===r){if(e.prev&&e.next){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev||e.next?e.next?e.prev||(n._first=n._first.next,n._first.prev=void 0):(n._last=n._last.prev,n._last.next=void 0):(n._first=void 0,n._last=void 0);break}e=e.next}}},e.prototype.iterator=function(){var e,t=this._first;return{next:function(){return t?(e?e.value=t.element:e={done:!1,value:t.element},t=t.next,e):g}}},e}();!function(e){var t={dispose:function(){}};e.None=function(){return t}}(b||(b={}));var v=function(){function e(e){void 0===e&&(e=null),this._options=e,this._event=null,this._disposed=!1,this._deliveryQueue=null,this._listeners=null}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,r,i){t._listeners||(t._listeners=new w);var o=t._listeners.isEmpty();o&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var s,a=t._listeners.push(r?[n,r]:n);return o&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,r),s={dispose:function(){(s.dispose=e._noop,t._disposed)||(a(),t._options&&t._options.onLastListenerRemove&&(t._listeners&&!t._listeners.isEmpty()||t._options.onLastListenerRemove(t)))}},Array.isArray(i)&&i.push(s),s}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(var t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);for(;this._deliveryQueue.length>0;){var r=this._deliveryQueue.shift(),i=r[0],o=r[1];try{"function"==typeof i?i.call(void 0,o):i[0].call(i[1],o)}catch(n){s(n)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=null),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}();!function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new v({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return function(e){return{dispose:function(){e()}}}(function(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}((function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)})))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach((function(t){return e.hook(t)}))},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach((function(t){return e.unhook(t)}))},e.prototype.hook=function(e){var t=this;e.listener=e.event((function(e){return t.emitter.fire(e)}))},e.prototype.unhook=function(e){e.listener&&e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()}}();!function(){function e(){this.buffers=[]}e.prototype.wrapEvent=function(e){var t=this;return function(n,r,i){return e((function(e){var i=t.buffers[t.buffers.length-1];i?i.push((function(){return n.call(r,e)})):n.call(r,e)}),void 0,i)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t);var n=e();return this.buffers.pop(),t.forEach((function(e){return e()})),n}}();!function(){function e(e){this._event=e}Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e((n=this._event,r=t,function(e,t,i){return void 0===t&&(t=null),n((function(n){return e.call(t,r(n))}),null,i)}));var n,r},e.prototype.filter=function(t){return new e((n=this._event,r=t,function(e,t,i){return void 0===t&&(t=null),n((function(n){return r(n)&&e.call(t,n)}),null,i)}));var n,r},e.prototype.on=function(e,t,n){return this._event(e,t,n)}}();!function(){function e(){var e=this;this.listening=!1,this.inputEvent=b.None,this.inputEventListener=d.None,this.emitter=new v({onFirstListenerDidAdd:function(){e.listening=!0,e.inputEventListener=e.inputEvent(e.emitter.fire,e.emitter)},onLastListenerRemove:function(){e.listening=!1,e.inputEventListener.dispose()}}),this.event=this.emitter.event}Object.defineProperty(e.prototype,"input",{set:function(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()}}();var x,k,C=Object.freeze((function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}}));(k=x||(x={})).isCancellationToken=function(e){return e===k.None||e===k.Cancelled||e instanceof S||!(!e||"object"!=typeof e)&&"boolean"==typeof e.isCancellationRequested&&"function"==typeof e.onCancellationRequested},k.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:b.None}),k.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:C});var S=function(){function e(){this._isCancelled=!1,this._emitter=null}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?C:(this._emitter||(this._emitter=new v),this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=null)},e}(),_=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new S),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof S&&this._token.cancel():this._token=x.Cancelled},e.prototype.dispose=function(){this._token?this._token instanceof S&&this._token.dispose():this._token=x.None},e}(),F=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.task=null}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.b((function(e,t){n.doResolve=e,n.doReject=t})).then((function(){n.completionPromise=null,n.doResolve=null;var e=n.task;return n.task=null,e()}))),this.timeout=setTimeout((function(){n.timeout=null,n.doResolve(null)}),t),this.completionPromise},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.doReject(c()),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e.prototype.dispose=function(){this.cancelTimeout()}}();var E;(function(e){function t(t,n){var r=e.call(this)||this;return r._token=-1,"function"==typeof t&&"number"==typeof n&&r.setIfNotSet(t,n),r}F(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=setTimeout((function(){n._token=-1,e()}),t)},t.prototype.setIfNotSet=function(e,t){var n=this;-1===this._token&&(this._token=setTimeout((function(){n._token=-1,e()}),t))}})(d),function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}F(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearInterval(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=setInterval((function(){e()}),t)}}(d),function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)},e.prototype.isScheduled=function(){return-1!==this.timeoutToken},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.doRun()},e.prototype.doRun=function(){this.runner&&this.runner()}}();!function(){if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){var e=Object.freeze({didTimeout:!0,timeRemaining:function(){return 15}});E=function(t,n){void 0===n&&(n=0);var r=setTimeout((function(){return t(e)}),n),i=!1;return{dispose:function(){i||(i=!0,clearTimeout(r))}}}}else E=function(e,t){var n=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0),r=!1;return{dispose:function(){r||(r=!0,cancelIdleCallback(n))}}}}();!function(){function e(e){var t=this;this._executor=function(){try{t._value=e()}catch(e){t._error=e}finally{t._didRun=!0}},this._handle=E((function(){return t._executor()}))}e.prototype.dispose=function(){this._handle.dispose()},e.prototype.getValue=function(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}}();var T=function(){function e(e){var t,n;(n=t=e)&&"function"==typeof n.then&&"function"==typeof t.done?this._winjsPromise=e:this._winjsPromise=new r.a((function(t,n){var r=!0;e((function(e){r?u.d((function(){return t(e)})):t(e)}),(function(e){r?u.d((function(){return n(e)})):n(e)})),r=!1}))}return e.all=function(t){return new e(r.a.join(t).then(null,(function(e){for(var t in e)if(e.hasOwnProperty(t))return e[t]})))},e.race=function(t){return new e(r.a.any(t).then((function(e){return e.value}),(function(e){return e.value})))},e.resolve=function(t){return new e(r.a.wrap(t))},e.reject=function(t){return new e(r.a.wrapError(t))},e.prototype.then=function(t,n){var i=!0,o=new e(this._winjsPromise.then(t&&function(e){return i?new r.a((function(n,r){u.d((function(){var i;try{i=t(e)}catch(e){return void r(e)}n(i)}))})):t(e)},n&&function(e){return i?new r.a((function(t,r){u.d((function(){var i;try{i=n(e)}catch(e){return void r(e)}t(i)}))})):n(e)}));return i=!1,o},e.prototype.catch=function(e){return this.then(null,e)},e}(),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),A=self;void 0===A.Promise&&(A.Promise=T);var P=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){var n=this,r=String(++this._lastSentReq);return new Promise((function(i,o){n._pendingReplies[r]={resolve:i,reject:o},n._send({vsWorker:n._workerId,req:r,method:e,args:t})}))},e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e)}catch(e){return}t&&t.vsWorker&&(-1!==this._workerId&&t.vsWorker!==this._workerId||this._handleMessage(t))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var n=e;if(!this._pendingReplies[n.seq])return void console.warn("Got reply to unknown seq");var r=this._pendingReplies[n.seq];if(delete this._pendingReplies[n.seq],n.err){var i=n.err;return n.err.$isError&&((i=new Error).name=n.err.name,i.message=n.err.message,i.stack=n.err.stack),void r.reject(i)}r.resolve(n.res)}else{var o=e,s=o.req;this._handler.handleMessage(o.method,o.args).then((function(e){t._send({vsWorker:t._workerId,seq:s,res:e,err:void 0})}),(function(e){e.detail instanceof Error&&(e.detail=a(e.detail)),t._send({vsWorker:t._workerId,seq:s,res:void 0,err:a(e)})}))}},e.prototype._send=function(e){var t=JSON.stringify(e);this._handler.sendMessage(t)},e}(),O=(function(e){function t(t,n){var r=e.call(this)||this,i=null;r._worker=r._register(t.create("vs/base/common/worker/simpleWorker",(function(e){r._protocol.handleMessage(e)}),(function(e){i&&i(e)}))),r._protocol=new P({sendMessage:function(e){r._worker.postMessage(e)},handleMessage:function(e,t){return Promise.resolve(null)}}),r._protocol.setWorkerId(r._worker.getId());var o=null;void 0!==self.require&&"function"==typeof self.require.getConfig?o=self.require.getConfig():void 0!==self.requirejs&&(o=self.requirejs.s.contexts._.config),r._onModuleLoaded=r._protocol.sendMessage("$initialize",[r._worker.getId(),n,o]),r._lazyProxy=new Promise((function(e,t){i=t,r._onModuleLoaded.then((function(t){for(var n={},r=0;r<t.length;r++)n[t[r]]=a(t[r],s);e(n)}),(function(e){t(e),r._onError("Worker failed to load "+n,e)}))}));var s=function(e,t){return r._request(e,t)},a=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}};return r}I(t,e),t.prototype.getProxyObject=function(){return this._lazyProxy},t.prototype._request=function(e,t){var n=this;return new Promise((function(r,i){n._onModuleLoaded.then((function(){n._protocol.sendMessage(e,t).then(r,i)}),i)}))},t.prototype._onError=function(e,t){console.error(e),console.info(t)}}(d),function(){function e(e,t){var n=this;this._requestHandler=t,this._protocol=new P({sendMessage:function(t){e(t)},handleMessage:function(e,t){return n._handleMessage(e,t)}})}return e.prototype.onmessage=function(e){this._protocol.handleMessage(e)},e.prototype._handleMessage=function(e,t){if("$initialize"===e)return this.initialize(t[0],t[1],t[2]);if(!this._requestHandler||"function"!=typeof this._requestHandler[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,t))}catch(e){return Promise.reject(e)}},e.prototype.initialize=function(e,t,n){var r=this;if(this._protocol.setWorkerId(e),this._requestHandler){var i=[];for(var o in this._requestHandler)"function"==typeof this._requestHandler[o]&&i.push(o);return Promise.resolve(i)}return n&&(void 0!==n.baseUrl&&delete n.baseUrl,void 0!==n.paths&&void 0!==n.paths.vs&&delete n.paths.vs,n.catchError=!0,self.require.config(n)),new Promise((function(e,n){self.require([t],(function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var o=t[0];if(r._requestHandler=o.create(),r._requestHandler){var s=[];for(var a in r._requestHandler)"function"==typeof r._requestHandler[a]&&s.push(a);e(s)}else n(new Error("No RequestHandler!"))}),n)}))},e}());function N(e,t){return function e(t,n,r,i,o){if(i<=r)return;var s=r+(i-r)/2|0;if(e(t,n,r,s,o),e(t,n,s+1,i,o),n(t[s],t[s+1])<=0)return;!function(e,t,n,r,i,o){for(var s=n,a=r+1,l=n;l<=i;l++)o[l]=e[l];for(l=n;l<=i;l++)s>r?e[l]=o[a++]:a>i?e[l]=o[s++]:t(o[a],o[s])<0?e[l]=o[a++]:e[l]=o[s++]}(t,n,r,s,i,o)}(e,t,0,e.length-1,[]),e}var L=function(){function e(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}return e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength},e}();function R(e){return{getLength:function(){return e.length},getElementAtIndex:function(t){return e.charCodeAt(t)}}}function D(e,t,n){return new V(R(e),R(t)).ComputeDiff(n)}var z,U=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}(),M=function(){function e(){}return e.Copy=function(e,t,n,r,i){for(var o=0;o<i;o++)n[r+o]=e[t+o]},e}(),j=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 L(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}(),V=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e.prototype.ElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.OriginalElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.OriginalSequence.getElementAtIndex(t)},e.prototype.ModifiedElementsAreEqual=function(e,t){return this.ModifiedSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1,e)},e.prototype._ComputeDiff=function(e,t,n,r,i){var o=this.ComputeDiffRecursive(e,t,n,r,[!1]);return i?this.PrettifyChanges(o):o},e.prototype.ComputeDiffRecursive=function(e,t,n,r,i){for(i[0]=!1;e<=t&&n<=r&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;if(e>t||n>r){var o=void 0;return n<=r?(U.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new L(e,0,n,r-n+1)]):e<=t?(U.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[new L(e,t-e+1,n,0)]):(U.Assert(e===t+1,"originalStart should only be one more than originalEnd"),U.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}var s=[0],a=[0],l=this.ComputeRecursionPoint(e,t,n,r,s,a,i),c=s[0],h=a[0];if(null!==l)return l;if(!i[0]){var d=this.ComputeDiffRecursive(e,c,n,h,i),u=[];return u=i[0]?[new L(c+1,t-(c+1)+1,h+1,r-(h+1)+1)]:this.ComputeDiffRecursive(c+1,t,h+1,r,i),this.ConcatenateChanges(d,u)}return[new L(e,t-e+1,n,r-n+1)]},e.prototype.WALKTRACE=function(e,t,n,r,i,o,s,a,l,c,h,d,u,m,p,f,g,b){var y,w,v=null,x=new j,k=t,C=n,S=u[0]-f[0]-r,_=Number.MIN_VALUE,F=this.m_forwardHistory.length-1;do{(w=S+e)===k||w<C&&l[w-1]<l[w+1]?(m=(h=l[w+1])-S-r,h<_&&x.MarkNextChange(),_=h,x.AddModifiedElement(h+1,m),S=w+1-e):(m=(h=l[w-1]+1)-S-r,h<_&&x.MarkNextChange(),_=h-1,x.AddOriginalElement(h,m+1),S=w-1-e),F>=0&&(e=(l=this.m_forwardHistory[F])[0],k=1,C=l.length-1)}while(--F>=-1);if(y=x.getReverseChanges(),b[0]){var E=u[0]+1,T=f[0]+1;if(null!==y&&y.length>0){var I=y[y.length-1];E=Math.max(E,I.getOriginalEnd()),T=Math.max(T,I.getModifiedEnd())}v=[new L(E,d-E+1,T,p-T+1)]}else{x=new j,k=o,C=s,S=u[0]-f[0]-a,_=Number.MAX_VALUE,F=g?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(w=S+i)===k||w<C&&c[w-1]>=c[w+1]?(m=(h=c[w+1]-1)-S-a,h>_&&x.MarkNextChange(),_=h+1,x.AddOriginalElement(h+1,m+1),S=w+1-i):(m=(h=c[w-1])-S-a,h>_&&x.MarkNextChange(),_=h,x.AddModifiedElement(h+1,m+1),S=w-1-i),F>=0&&(i=(c=this.m_reverseHistory[F])[0],k=1,C=c.length-1)}while(--F>=-1);v=x.getChanges()}return this.ConcatenateChanges(y,v)},e.prototype.ComputeRecursionPoint=function(e,t,n,r,i,o,s){var a,l=0,c=0,h=0,d=0,u=0,m=0;e--,n--,i[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var p,f,g=t-e+(r-n),b=g+1,y=new Array(b),w=new Array(b),v=r-n,x=t-e,k=e-n,C=t-r,S=(x-v)%2==0;for(y[v]=e,w[x]=t,s[0]=!1,a=1;a<=g/2+1;a++){var _=0,F=0;for(h=this.ClipDiagonalBound(v-a,a,v,b),d=this.ClipDiagonalBound(v+a,a,v,b),p=h;p<=d;p+=2){for(c=(l=p===h||p<d&&y[p-1]<y[p+1]?y[p+1]:y[p-1]+1)-(p-v)-k,f=l;l<t&&c<r&&this.ElementsAreEqual(l+1,c+1);)l++,c++;if(y[p]=l,l+c>_+F&&(_=l,F=c),!S&&Math.abs(p-x)<=a-1&&l>=w[p])return i[0]=l,o[0]=c,f<=w[p]&&a<=1448?this.WALKTRACE(v,h,d,k,x,u,m,C,y,w,l,t,i,c,r,o,S,s):null}var E=(_-e+(F-n)-a)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(_,this.OriginalSequence,E))return s[0]=!0,i[0]=_,o[0]=F,E>0&&a<=1448?this.WALKTRACE(v,h,d,k,x,u,m,C,y,w,l,t,i,c,r,o,S,s):(e++,n++,[new L(e,t-e+1,n,r-n+1)]);for(u=this.ClipDiagonalBound(x-a,a,x,b),m=this.ClipDiagonalBound(x+a,a,x,b),p=u;p<=m;p+=2){for(c=(l=p===u||p<m&&w[p-1]>=w[p+1]?w[p+1]-1:w[p-1])-(p-x)-C,f=l;l>e&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(w[p]=l,S&&Math.abs(p-v)<=a&&l<=y[p])return i[0]=l,o[0]=c,f>=y[p]&&a<=1448?this.WALKTRACE(v,h,d,k,x,u,m,C,y,w,l,t,i,c,r,o,S,s):null}if(a<=1447){var T=new Array(d-h+2);T[0]=v-h+1,M.Copy(y,h,T,1,d-h+1),this.m_forwardHistory.push(T),(T=new Array(m-u+2))[0]=x-u+1,M.Copy(w,u,T,1,m-u+1),this.m_reverseHistory.push(T)}}return this.WALKTRACE(v,h,d,k,x,u,m,C,y,w,l,t,i,c,r,o,S,s)},e.prototype.PrettifyChanges=function(e){for(var t=0;t<e.length;t++){for(var n=e[t],r=t<e.length-1?e[t+1].originalStart:this.OriginalSequence.getLength(),i=t<e.length-1?e[t+1].modifiedStart:this.ModifiedSequence.getLength(),o=n.originalLength>0,s=n.modifiedLength>0;n.originalStart+n.originalLength<r&&n.modifiedStart+n.modifiedLength<i&&(!o||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!s||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));)n.originalStart++,n.modifiedStart++;var a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(t=e.length-1;t>=0;t--){n=e[t],r=0,i=0;if(t>0){var l=e[t-1];l.originalLength>0&&(r=l.originalStart+l.originalLength),l.modifiedLength>0&&(i=l.modifiedStart+l.modifiedLength)}o=n.originalLength>0,s=n.modifiedLength>0;for(var c=0,h=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),d=1;;d++){var u=n.originalStart-d,m=n.modifiedStart-d;if(u<r||m<i)break;if(o&&!this.OriginalElementsAreEqual(u,u+n.originalLength))break;if(s&&!this.ModifiedElementsAreEqual(m,m+n.modifiedLength))break;var p=this._boundaryScore(u,n.originalLength,m,n.modifiedLength);p>h&&(h=p,c=d)}n.originalStart-=c,n.modifiedStart-=c}return e},e.prototype._OriginalIsBoundary=function(e){if(e<=0||e>=this.OriginalSequence.getLength()-1)return!0;var t=this.OriginalSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){if(e<=0||e>=this.ModifiedSequence.getLength()-1)return!0;var t=this.ModifiedSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var r=new Array(e.length+t.length-1);return M.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],M.Copy(t,1,r,e.length,t.length-1),r}r=new Array(e.length+t.length);return M.Copy(e,0,r,0,e.length),M.Copy(t,0,r,e.length,t.length),r},e.prototype.ChangesOverlap=function(e,t,n){if(U.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),U.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.m