UNPKG

@inst/vscode-bin-darwin

Version:

BINARY ONLY - VSCode binary deployment for macOS

4 lines 83.9 kB
/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ (function(){var e=["exports","require","vs/base/common/winjs.base","vs/base/common/platform","path","vs/base/common/uri","vs/base/common/event","vs/base/common/lifecycle","vs/base/common/errors","vs/platform/node/product","vs/base/common/types","fs","vs/base/common/functional","os","vs/base/common/cancellation","vs/base/common/objects","vs/base/common/callbackList","vs/base/common/arrays","vs/base/common/map","vs/base/common/async","vs/base/node/flow","assert","vs/base/node/extfs","vs/base/common/strings","vs/base/common/uuid","vs/base/node/pfs","vs/base/common/linkedList","vs/nls!vs/platform/environment/node/argv","vs/platform/environment/node/argv","vs/platform/node/package","vs/nls!vs/code/node/cli","vs/nls","vs/base/common/winjs.base.raw","minimist","vs/code/node/cli","child_process"],t=function(t){for(var n=[],r=0,i=t.length;r<i;r++)n[r]=e[t[r]];return n};define(e[17],t([1,0]),function(e,t){"use strict";function n(e,t){var n=0,r=e.length;if(0===r)return 0;for(;n<r;){var i=Math.floor((n+r)/2);t(e[i])?r=i:n=i+1}return n}function r(e,t){if(!(e.length<=1)){var n=e.length/2|0,i=e.slice(0,n),o=e.slice(n);r(i,t),r(o,t);for(var u=0,s=0,a=0;u<i.length&&s<o.length;){var c=t(i[u],o[s]);e[a++]=c<=0?i[u++]:o[s++]}for(;u<i.length;)e[a++]=i[u++];for(;s<o.length;)e[a++]=o[s++]}}function i(e,t,n){function r(e,t,n){if(0!==t||0!==n.length){var r=i[i.length-1];r&&r.start+r.deleteCount===e?(r.deleteCount+=t,(o=r.inserted).push.apply(o,n)):i.push({start:e,deleteCount:t,inserted:n});var o}}for(var i=[],o=0,u=0;;){if(o===e.length){r(o,0,t.slice(u));break}if(u===t.length){r(o,e.length-o,[]);break}var s=e[o],a=t[u],c=n(s,a);0===c?(o+=1,u+=1):c<0?(r(o,1,[]),o+=1):c>0&&(r(o,0,[a]),u+=1)}return i}function o(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}Object.defineProperty(t,"__esModule",{value:!0}),t.tail=function(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]},t.equals=function(e,t,n){if(void 0===n&&(n=function(e,t){return e===t}),e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0},t.binarySearch=function(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=(r+i)/2|0,u=n(e[o],t);if(u<0)r=o+1;else{if(!(u>0))return o;i=o-1}}return-(r+1)},t.findFirst=n,t.mergeSort=function(e,t){return r(e,t),e},t.groupBy=function(e,t){for(var n,r=[],i=0,o=e.slice(0).sort(t);i<o.length;i++){var u=o[i];n&&0===t(n[0],u)?n.push(u):(n=[u],r.push(n))}return r},t.sortedDiff=i,t.delta=function(e,t,n){for(var r=[],o=[],u=0,s=i(e,t,n);u<s.length;u++){var a=s[u];r.push.apply(r,e.slice(a.start,a.start+a.deleteCount)),o.push.apply(o,a.inserted)}return{removed:r,added:o}},t.top=function(e,t,r){if(0===r)return[];for(var i=e.slice(0,r).sort(t),o=r,u=e.length;o<u;o++)!function(o,u){var s=e[o];if(t(s,i[r-1])<0){i.pop();var a=n(i,function(e){return t(s,e)<0});i.splice(a,0,s)}}(o);return i},t.coalesce=function(e){return e?e.filter(function(e){return!!e}):e},t.move=function(e,t,n){e.splice(n,0,e.splice(t,1)[0])},t.isFalsyOrEmpty=function(e){return!Array.isArray(e)||0===e.length},t.distinct=function(e,t){if(!t)return e.filter(function(t,n){return e.indexOf(t)===n});var n=Object.create(null);return e.filter(function(e){var r=t(e);return!n[r]&&(n[r]=!0,!0)})},t.uniqueFilter=function(e){var t=Object.create(null);return function(n){var r=e(n);return!t[r]&&(t[r]=!0,!0)}},t.firstIndex=o,t.first=function(e,t,n){void 0===n&&(n=null);var r=o(e,t);return r<0?n:e[r]},t.commonPrefixLength=function(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);i<o&&n(e[i],t[i]);i++)r++;return r},t.flatten=function(e){return e.reduce(function(e,t){return e.concat(t)},[])},t.range=function(e,t){var n="number"==typeof t?e:0;"number"==typeof t?n=e:(n=0,t=e);var r=[];if(n<=t)for(i=n;i<t;i++)r.push(i);else for(var i=n;i>t;i--)r.push(i);return r},t.weave=function(e,t){for(var n=[],r=0,i=0,o=0,u=e.length+t.length;o<u;o++)o%2==0&&r<e.length||i>=t.length?n.push(e[r++]):n.push(t[i++]);return n},t.fill=function(e,t,n){void 0===n&&(n=[]);for(var r=0;r<e;r++)n[r]=t();return n},t.index=function(e,t,n){return void 0===n&&(n=function(e){return e}),e.reduce(function(e,r){var i=t(r);return e[i]=n(r,e[i]),e},Object.create(null))},t.insert=function(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}},t.arrayInsert=function(e,t,n){var r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)}}),define(e[12],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(void 0,t)}},t.once=function(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}}),define(e[7],t([1,0,12]),function(e,t,n){"use strict";function r(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?(r(e),r(t),[]):e?(e.dispose(),e):void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.empty=Object.freeze({dispose:function(){}}),t.isDisposable=function(e){return"function"==typeof e.dispose&&0===e.dispose.length},t.dispose=r,t.combinedDisposable=function(e){return{dispose:function(){return r(e)}}},t.toDisposable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{dispose:function(){for(var t=0,n=e;t<n.length;t++)(0,n[t])()}}};var i=function(){function e(){this._toDispose=[]}return e.prototype.dispose=function(){this._toDispose=r(this._toDispose)},e.prototype._register=function(e){return this._toDispose.push(e),e},e}();t.Disposable=i;var o=function(){function e(){this.references=Object.create(null)}return e.prototype.acquire=function(e){var t=this,r=this.references[e];r||(r=this.references[e]={counter:0,object:this.createReferencedObject(e)});var i=r.object,o=n.once(function(){0==--r.counter&&(t.destroyReferencedObject(r.object),delete t.references[e])});return r.counter++,{object:i,dispose:o}},e}();t.ReferenceCollection=o;var u=function(){function e(e){this.object=e}return e.prototype.dispose=function(){},e}();t.ImmortalReference=u}),define(e[26],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e){this.element=e}}(),r=function(){function e(){}return e.prototype.isEmpty=function(){return!this._first},e.prototype.insert=function(e){var t=this,r=new n(e);if(this._first){var i=this._last;this._last=r,r.prev=i,i.next=r}else this._first=r,this._last=r;return function(){for(var e=t._first;e instanceof n;e=e.next)if(e===r){if(e.prev&&e.next){var i=e.prev;i.next=e.next,e.next.prev=i}else e.prev||e.next?e.next?e.prev||(t._first=t._first.next,t._first.prev=void 0):(t._last=t._last.prev,t._last.next=void 0):(t._first=void 0,t._last=void 0);break}}},e.prototype.iterator=function(){var e,t,n={get done(){return e},get value(){return t}},r=this._first;return{next:function(){return r?(e=!1,t=r.element,r=r.next):(e=!0,t=void 0),n}}},e.prototype.toArray=function(){for(var e=[],t=this._first;t instanceof n;t=t.next)e.push(t.element);return e},e}();t.LinkedList=r}),define(e[3],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1,r=!1,i=!1,o=!1,u=!1,s=!1,a=void 0,c=void 0;if(t.LANGUAGE_DEFAULT="en","object"==typeof process){n="win32"===process.platform,r="darwin"===process.platform,i="linux"===process.platform,o=!n&&0===process.getuid();var l=process.env.VSCODE_NLS_CONFIG;if(l)try{var f=JSON.parse(l),h=f.availableLanguages["*"];a=f.locale,c=h||t.LANGUAGE_DEFAULT}catch(e){}u=!0}else if("object"==typeof navigator){var p=navigator.userAgent;n=p.indexOf("Windows")>=0,r=p.indexOf("Macintosh")>=0,i=p.indexOf("Linux")>=0,s=!0,c=a=navigator.language}var d;!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(d=t.Platform||(t.Platform={}));var v=d.Web;u&&(r?v=d.Mac:n?v=d.Windows:i&&(v=d.Linux)),t.isWindows=n,t.isMacintosh=r,t.isLinux=i,t.isRootUser=o,t.isNative=u,t.isWeb=s,t.platform=v,t.language=c,t.locale=a;var m="object"==typeof self?self:global;t.globals=m,t.hasWebWorkerSupport=function(){return void 0!==m.Worker},t.setTimeout=m.setTimeout.bind(m),t.clearTimeout=m.clearTimeout.bind(m),t.setInterval=m.setInterval.bind(m),t.clearInterval=m.clearInterval.bind(m);!function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"}(t.OperatingSystem||(t.OperatingSystem={})),t.OS=r?2:n?1:3;!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(t.AccessibilitySupport||(t.AccessibilitySupport={}))}),define(e[10],t([1,0]),function(e,t){"use strict";function n(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==a.number||e.constructor!==Array)}function r(e){return typeof e===a.string||e instanceof String}function i(e){return!(typeof e!==a.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function o(e){return typeof e===a.undefined}function u(e){return typeof e===a.function}function s(e,t){if(r(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(u(t)){if(e instanceof t)return;if(e&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}Object.defineProperty(t,"__esModule",{value:!0});var a={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};t.isArray=n,t.isString=r,t.isStringArray=function(e){return n(e)&&e.every(function(e){return r(e)})},t.isObject=i,t.isNumber=function(e){return(typeof e===a.number||e instanceof Number)&&!isNaN(e)},t.isBoolean=function(e){return!0===e||!1===e},t.isUndefined=o,t.isUndefinedOrNull=function(e){return o(e)||null===e};var c=Object.prototype.hasOwnProperty;t.isEmptyObject=function(e){if(!i(e))return!1;for(var t in e)if(c.call(e,t))return!1;return!0},t.isFunction=u,t.areFunctions=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e&&e.length>0&&e.every(u)},t.validateConstraints=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)s(e[r],t[r])},t.validateConstraint=s,t.create=function(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}}),define(e[15],t([1,0,10]),function(e,t,n){"use strict";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){e[n]&&"object"==typeof e[n]?t[n]=r(e[n]):t[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){e[n]&&"object"==typeof e[n]?t[n]=i(e[n]):t[n]=e[n]}),t}function o(e,t,r){if(n.isUndefinedOrNull(e))return e;var i=t(e);if(void 0!==i)return i;if(n.isArray(e)){for(var u=[],s=0;s<e.length;s++)u.push(o(e[s],t,r));return u}if(n.isObject(e)){if(r.indexOf(e)>=0)throw new Error("Cannot clone recursive data-structure");r.push(e);var a={};for(var c in e)l.call(e,c)&&(a[c]=o(e[c],t,r));return r.pop(),a}return e}function u(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])?u(e[i],t[i],r):e[i]=t[i]):e[i]=t[i]}),e):t}function s(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach(function(t){return Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}function a(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(!a(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(),!a(i,o))return!1;for(n=0;n<i.length;n++)if(!a(e[i[n]],t[i[n]]))return!1}return!0}function c(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}Object.defineProperty(t,"__esModule",{value:!0}),t.clone=r,t.deepClone=i;var l=Object.prototype.hasOwnProperty;t.cloneAndChange=function(e,t){return o(e,t,[])},t.mixin=u,t.assign=s,t.toObject=function(e,t){return e.reduce(function(e,n){return s(e,(r={},r[t(n)]=n,r));var r},Object.create(null))},t.equals=a,t.ensureProperty=function(e,t,n){void 0===e[t]&&(e[t]=n)},t.arrayToHash=c,t.createKeywordMatcher=function(e,t){void 0===t&&(t=!1),t&&(e=e.map(function(e){return e.toLowerCase()}));var n=c(e);return t?function(e){return void 0!==n[e.toLowerCase()]&&n.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==n[e]&&n.hasOwnProperty(e)}},t.derive=function(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})},t.safeStringify=function(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})},t.getOrDefault=function(e,t,n){void 0===n&&(n=null);var r=t(e);return void 0===r?n:r},t.distinct=function(e,t){var n=Object.create(null);return e&&t?(Object.keys(t).forEach(function(r){var i=e[r],o=t[r];a(i,o)||(n[r]=o)}),n):n}});var n=this&&this.__extends||function(){var 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])};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)}}();define(e[5],t([1,0,3]),function(e,t,r){"use strict";function i(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return encodeURIComponent(e).replace(/[!'()*]/g,i)}function u(e){return e.replace(/[#?]/,i)}function s(e){if(e.scheme&&!l.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!f.test(e.path))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')}else if(h.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function a(e){var t;return t=e.authority&&e.path&&"file"===e.scheme?"//"+e.authority+e.path:m.test(e.path)?e.path[1].toLowerCase()+e.path.substr(2):e.path,r.isWindows&&(t=t.replace(/\//g,"\\")),t}function c(e,t){var n=t?u:o,r=[],i=e.scheme,s=e.authority,a=e.path,c=e.query,l=e.fragment;if(i&&r.push(i,":"),(s||"file"===i)&&r.push("//"),s){if(-1!==(m=s.indexOf("@"))){var f=s.substr(0,m);s=s.substr(m+1),-1===(m=f.indexOf(":"))?r.push(n(f)):r.push(n(f.substr(0,m)),":",n(f.substr(m+1))),r.push("@")}-1===(m=(s=s.toLowerCase()).indexOf(":"))?r.push(n(s)):r.push(n(s.substr(0,m)),s.substr(m))}if(a){var h=_.exec(a);h&&(a=h[1]?"/"+h[2].toLowerCase()+a.substr(3):h[2].toLowerCase()+a.substr(2));for(var v=0;;){var m=a.indexOf(d,v);if(-1===m){r.push(n(a.substring(v)));break}r.push(n(a.substring(v,m)),d),v=m+1}}return c&&r.push("?",n(c)),l&&r.push("#",n(l)),r.join(p)}Object.defineProperty(t,"__esModule",{value:!0});var l=/^\w[\w\d+.-]*$/,f=/^\//,h=/^\/\//,p="",d="/",v=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,m=/^\/[a-zA-Z]:/,_=/^(\/)?([A-Z]:)/,y=/^[a-zA-Z]:/,g=function(){function e(e,t,n,r,i){this.scheme=e||p,this.authority=t||p,this.path=n||p,this.query=r||p,this.fragment=i||p,s(this)}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return a(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===n?n=this.authority:null===n&&(n=""),void 0===r?r=this.path:null===r&&(r=""),void 0===i?i=this.query:null===i&&(i=""),void 0===o?o=this.fragment:null===o&&(o=""),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new b(t,n,r,i,o)},e.parse=function(e){var t=v.exec(e);return t?new b(t[2]||p,decodeURIComponent(t[4]||p),decodeURIComponent(t[5]||p),decodeURIComponent(t[7]||p),decodeURIComponent(t[9]||p)):new b(p,p,p,p,p)},e.file=function(e){var t=p;if(r.isWindows&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){var n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return y.test(e)?e=d+e:e[0]!==d&&(e=d+e),new b("file",t,e,p,p)},e.from=function(e){return new b(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),c(this,e)},e.prototype.toJSON=function(){var e={$mid:1,fsPath:this.fsPath,external:this.toString()};return this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},e.revive=function(e){var t=new b(e.scheme,e.authority,e.path,e.query,e.fragment);return t._fsPath=e.fsPath,t._formatted=e.external,t},e}();t.default=g;var b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return n(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=a(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?c(this,!0):(this._formatted||(this._formatted=c(this,!1)),this._formatted)},t}(g)}),define(e[18],t([1,0,5]),function(e,t,r){"use strict";function i(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}function o(e){var t=[];return e.forEach(function(e,n){return t.push(n)}),t}Object.defineProperty(t,"__esModule",{value:!0}),t.values=i,t.keys=o,t.getOrSet=function(e,t,n){var r=e.get(t);return void 0===r&&(r=n,e.set(t,r)),r};var u=function(){function e(e,t,n){void 0===e&&(e=Number.MAX_VALUE),void 0===t&&(t=1);var r=this;this.limit=e,this.map=new Map,this.ratio=e*t,n&&n.entries.forEach(function(e){r.set(e.key,e.value)})}return e.prototype.setLimit=function(e){if(!(e<0))for(this.limit=e;this.map.size>this.limit;)this.trim()},e.prototype.serialize=function(){var e={entries:[]};return this.map.forEach(function(t){e.entries.push({key:t.key,value:t.value})}),e},Object.defineProperty(e.prototype,"size",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t){if(this.map.has(e))return!1;var n={key:e,value:t};return this.push(n),this.size>this.limit&&this.trim(),!0},e.prototype.get=function(e){var t=this.map.get(e);return t?t.value:null},e.prototype.getOrSet=function(e,t){var n=this.get(e);return n||(this.set(e,t),t)},e.prototype.delete=function(e){var t=this.map.get(e);return t?(this.map.delete(e),t.next?t.next.prev=t.prev:this.head=t.prev,t.prev?t.prev.next=t.next:this.tail=t.next,t.value):null},e.prototype.has=function(e){return this.map.has(e)},e.prototype.clear=function(){this.map.clear(),this.head=null,this.tail=null},e.prototype.push=function(e){this.head&&(e.prev=this.head,this.head.next=e),this.tail||(this.tail=e),this.head=e,this.map.set(e.key,e)},e.prototype.trim=function(){if(this.tail)if(this.ratio<this.limit)for(var e=0,t=this.tail;t.next;){if(this.map.delete(t.key),e===this.ratio){this.tail=t.next,this.tail.prev=null;break}t=t.next,e++}else this.map.delete(this.tail.key),this.tail=this.tail.next,this.tail&&(this.tail.prev=null)},e}();t.BoundedMap=u;var s=function(){return function(){this.children=new Map}}(),a=function(){function e(e){this._root=new s,this._splitter=function(t){return e(t).filter(function(e){return Boolean(e)})}}return e.prototype.insert=function(e,t){for(var n=this._splitter(e),r=0,i=this._root;r<n.length;r++){var o=i.children.get(n[r]);if(!o)break;i=o}for(var u;r<n.length;r++)u=new s,i.children.set(n[r],u),i=u;i.element=t},e.prototype.lookUp=function(e){for(var t,n=this._splitter(e),r=this._root.children,i=0,o=n;i<o.length;i++){var u=o[i];if(!(t=r.get(u)))return;r=t.children}return t.element},e.prototype.findSubstr=function(e){for(var t,n=this._splitter(e),r=this._root.children,i=0,o=n;i<o.length;i++){var u=o[i],s=r.get(u);if(!s)break;s.element&&(t=s),r=s.children}if(t)return t.element},e.prototype.findSuperstr=function(t){for(var n,r=this._splitter(t),i=this._root.children,o=0,u=r;o<u.length;o++){var s=u[o];if(!(n=i.get(s)))return;i=n.children}var a=new e(this._splitter);return a._root=n,a},e}();t.TrieMap=a;var c=function(e){function t(n){return void 0===n&&(n=t.PathSplitter),e.call(this,n)||this}return n(t,e),t.PathSplitter=function(e){return e.split(/[\\/]/).filter(function(e){return!!e})},t}(a);t.StringTrieMap=c;var l=function(){function e(e){this.ignoreCase=e,this.map=new Map}return e.prototype.set=function(e,t){this.map.set(this.toKey(e),t)},e.prototype.get=function(e){return this.map.get(this.toKey(e))},e.prototype.has=function(e){return this.map.has(this.toKey(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.map.clear()},e.prototype.delete=function(e){return this.map.delete(this.toKey(e))},e.prototype.forEach=function(e){this.map.forEach(e)},e.prototype.values=function(){return i(this.map)},e.prototype.toKey=function(e){var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t},e}();t.ResourceMap=l;var f=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.keys=function(){return o(this.map).map(function(e){return r.default.parse(e)})},t}(l);t.StrictResourceMap=f;var h;!function(e){e.None=0,e.First=1,e.Last=2}(h=t.Touch||(t.Touch={}));var p=function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},e.prototype.isEmpty=function(){return!this._head&&!this._tail},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.get=function(e){var t=this._map.get(e);if(t)return t.value},e.prototype.set=function(e,t,n){void 0===n&&(n=h.None);var r=this._map.get(e);if(r)r.value=t,n!==h.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case h.None:this.addItemLast(r);break;case h.First:this.addItemFirst(r);break;case h.Last:default:this.addItemLast(r)}this._map.set(e,r),this._size++}},e.prototype.delete=function(e){return!!this.remove(e)},e.prototype.remove=function(e){var t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value},e.prototype.shift=function(){if(this._head||this._tail){if(!this._head||!this._tail)throw new Error("Invalid list");var e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.forEachReverse=function(e,t){for(var n=this._tail;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.previous},e.prototype.values=function(){for(var e=[],t=this._head;t;)e.push(t.value),t=t.next;return e},e.prototype.keys=function(){for(var e=[],t=this._head;t;)e.push(t.key),t=t.next;return e},e.prototype.addItemFirst=function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.removeItem=function(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===h.First||t===h.Last)if(t===h.First){if(e===this._head)return;var n=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===h.Last){if(e===this._tail)return;var n=e.next,r=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=r,r.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e}();t.LinkedMap=p}),define(e[23],t([1,0,18]),function(e,t,n){"use strict";function r(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function i(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var r=0;e.indexOf(t,r)===r;)r+=n;return e.substring(r)}function o(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(-1===(o=e.lastIndexOf(t,i-1))||o+n!==i)break;if(0===o)return"";i=o}return e.substring(0,i)}function u(e,n,r){if(!t.canNormalize||!e)return e;var i=r.get(e);if(i)return i;var o;return o=_.test(e)?e.normalize(n):e,r.set(e,o),o}function s(e,t){return e<t?-1:e>t?1:0}function a(e){return e>=97&&e<=122}function c(e){return e>=65&&e<=90}function l(e){return a(e)||c(e)}function f(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var r=0;r<n;r++){var i=e.charCodeAt(r),o=t.charCodeAt(r);if(i!==o)if(l(i)&&l(o)){var u=Math.abs(i-o);if(0!==u&&32!==u)return!1}else if(String.fromCharCode(i).toLowerCase()!==String.fromCharCode(o).toLowerCase())return!1}return!0}function h(e,t,n,r,i,o){for(;t<n&&i<o;){if(e[t]!==r[i])return!1;t+=1,i+=1}return!0}function p(e){return(e=+e)>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}Object.defineProperty(t,"__esModule",{value:!0}),t.empty="",t.isFalsyOrWhitespace=function(e){return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,n){void 0===n&&(n="0");for(var r=""+e,i=[r],o=r.length;o<t;o++)i.push(n);return i.reverse().join("")};var d=/{(\d+)}/g;t.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 0===t.length?e:e.replace(d,function(e,n){var r=parseInt(n,10);return isNaN(r)||r<0||r>=t.length?e:t[r]})},t.escape=function(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})},t.escapeRegExpCharacters=r,t.trim=function(e,t){return void 0===t&&(t=" "),o(i(e,t),t)},t.ltrim=i,t.rtrim=o,t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.stripWildcards=function(e){return e.replace(/\*/g,"")},t.startsWith=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},t.endsWith=function(e,t){var n=e.length-t.length;return n>0?e.indexOf(t,n)===n:0===n&&e===t},t.createRegExp=function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=r(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),new RegExp(e,i)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&e.exec("")&&0===e.lastIndex},t.canNormalize="function"==typeof"".normalize;var v=new n.BoundedMap(1e4);t.normalizeNFC=function(e){return u(e,"NFC",v)};var m=new n.BoundedMap(1e4);t.normalizeNFD=function(e){return u(e,"NFD",m)};var _=/[^\u0000-\u0080]/;t.firstNonWhitespaceIndex=function(e){for(var t=0,n=e.length;t<n;t++){var r=e.charCodeAt(t);if(32!==r&&9!==r)return t}return-1},t.getLeadingWhitespace=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(32!==i&&9!==i)return e.substring(t,r)}return e.substring(t,n)},t.lastNonWhitespaceIndex=function(e,t){void 0===t&&(t=e.length-1);for(var n=t;n>=0;n--){var r=e.charCodeAt(n);if(32!==r&&9!==r)return n}return-1},t.compare=s,t.compareIgnoreCase=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.charCodeAt(r),o=t.charCodeAt(r);if(i!==o){c(i)&&(i+=32),c(o)&&(o+=32);var u=i-o;if(0!==u)return a(i)&&a(o)?u:s(e.toLowerCase(),t.toLowerCase())}}return e.length<t.length?-1:e.length>t.length?1:0},t.equalsIgnoreCase=function(e,t){return(e?e.length:0)===(t?t.length:0)&&f(e,t)},t.beginsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&f(e,t,n)},t.commonPrefixLength=function(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return r},t.commonSuffixLength=function(e,t){var n,r=Math.min(e.length,t.length),i=e.length-1,o=t.length-1;for(n=0;n<r;n++)if(e.charCodeAt(i-n)!==t.charCodeAt(o-n))return n;return r},t.overlap=function(e,t){var n=e.length,r=t.length,i=n-r;if(0===i)return e===t?n:0;for(i<0&&(r+=i,i=0);i<n&&r>0;){if(h(e,i,n,t,0,r))return r;r-=1,i+=1}return 0},t.isHighSurrogate=function(e){return 55296<=e&&e<=56319},t.isLowSurrogate=function(e){return 56320<=e&&e<=57343};var y=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;t.containsRTL=function(e){return y.test(e)};var g=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/;t.containsEmoji=function(e){return g.test(e)};var b=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=function(e){return b.test(e)},t.containsFullWidthCharacter=function(e){for(var t=0,n=e.length;t<n;t++)if(p(e.charCodeAt(t)))return!0;return!1},t.isFullWidthCharacter=p,t.difference=function(e,t,n){void 0===n&&(n=4);var r=Math.abs(e.length-t.length);if(r>n)return 0;var i,o,u=[],s=[];for(i=0;i<t.length+1;++i)s.push(0);for(i=0;i<e.length+1;++i)u.push(s);for(i=1;i<e.length+1;++i)for(o=1;o<t.length+1;++o)e[i-1]===t[o-1]?u[i][o]=u[i-1][o-1]+1:u[i][o]=Math.max(u[i-1][o],u[i][o-1]);return u[e.length][t.length]-Math.sqrt(r)},t.computeLineStarts=function(e){for(var t=/\r\n|\r|\n/g,n=[0];t.exec(e);)n.push(t.lastIndex);return n},t.lcut=function(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)>n){r.splice(0,o);break}return r.join(t.empty).replace(/^\s/,t.empty)};var w=/\x1B\x5B[12]?K/g,E=/\x1b\[\d+m/g,x=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=function(e){return e&&(e=(e=(e=e.replace(w,"")).replace(E,"")).replace(x,"")),e},t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=function(e){return e&&e.length>0&&65279===e.charCodeAt(0)},t.appendWithLimit=function(e,t,n){var r=e.length+t.length;return r>n&&(e="..."+e.substr(r-n)),t.length>n?e+=t.substr(t.length-n):e+=t,e},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}}),define(e[24],t([1,0]),function(e,t){"use strict";function r(){return new u}function i(e){return s.test(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this._value=e}return e.prototype.asHex=function(){return this._value},e.prototype.equals=function(e){return this.asHex()===e.asHex()},e}(),u=function(e){function t(){return e.call(this,[t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))||this}return n(t,e),t._oneOf=function(e){return e[Math.floor(e.length*Math.random())]},t._randomHex=function(){return t._oneOf(t._chars)},t._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],t._timeHighBits=["8","9","a","b"],t}(o);t.v4=r;var s=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;t.isUUID=i,t.parse=function(e){if(!i(e))throw new Error("invalid uuid");return new o(e)},t.generateUuid=function(){return r().asHex()}}),function(){var e={};e["WinJS/Core/_WinJS"]={};var t=function(t,n,r){var i={},o=!1,u=n.map(function(t){return"exports"===t?(o=!0,i):e[t]}),s=r.apply({},u);e[t]=o?i:s};t("WinJS/Core/_Global",[],function(){"use strict";return"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{}}),t("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],function(e){"use strict";return{hasWinRT:!!e.Windows,markSupportedForProcessing:function(e){return e.supportedForProcessing=!0,e},_setImmediate:e.setImmediate?e.setImmediate.bind(e):function(t){e.setTimeout(t,0)}}}),t("WinJS/Core/_WriteProfilerMark",["WinJS/Core/_Global"],function(e){"use strict";return e.msWriteProfilerMark||function(){}}),t("WinJS/Core/_Base",["WinJS/Core/_WinJS","WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_WriteProfilerMark"],function(e,t,n,r){"use strict";function i(e,t,n){var r,i,o,u=Object.keys(t),s=Array.isArray(e);for(i=0,o=u.length;i<o;i++){var a=u[i],c=95!==a.charCodeAt(0),l=t[a];!l||"object"!=typeof l||void 0===l.value&&"function"!=typeof l.get&&"function"!=typeof l.set?c?s?e.forEach(function(e){e[a]=l}):e[a]=l:(r=r||{})[a]={value:l,enumerable:c,configurable:!0,writable:!0}:(void 0===l.enumerable&&(l.enumerable=c),n&&l.setName&&"function"==typeof l.setName&&l.setName(n+"."+a),(r=r||{})[a]=l)}r&&(s?e.forEach(function(e){Object.defineProperties(e,r)}):Object.defineProperties(e,r))}return function(){function n(n,r){var i=n||{};if(r){var o=r.split(".");i===t&&"WinJS"===o[0]&&(i=e,o.splice(0,1));for(var u=0,s=o.length;u<s;u++){var a=o[u];i[a]||Object.defineProperty(i,a,{value:{},writable:!1,enumerable:!0,configurable:!0}),i=i[a]}}return i}function o(e,t,r){var o=n(e,t);return r&&i(o,r,t||"<ANONYMOUS>"),o}var u=e;u.Namespace||(u.Namespace=Object.create(Object.prototype));var s={uninitialized:1,working:2,initialized:3};Object.defineProperties(u.Namespace,{defineWithParent:{value:o,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return o(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,i=s.uninitialized;return{setName:function(e){t=e},get:function(){switch(i){case s.initialized:return n;case s.uninitialized:i=s.working;try{r("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{r("WinJS.Namespace._lazy:"+t+",StopTM"),i=s.uninitialized}return e=null,i=s.initialized,n;case s.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(i){case s.working:throw"Illegal: reentrancy on initialization";default:i=s.initialized,n=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,r,o){var u=[e],s=null;return r&&(s=n(t,r),u.push(s)),i(u,o,r||"<ANONYMOUS>"),s},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,u){if(e){r=r||function(){};var s=e.prototype;return r.prototype=Object.create(s),n.markSupportedForProcessing(r),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,configurable:!0,enumerable:!0}),o&&i(r.prototype,o),u&&i(r,u),r}return t(r,o,u)},mix:function(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;t<n;t++)i(e.prototype,arguments[t]);return e}})}(),{Namespace:e.Namespace,Class:e.Class}}),t("WinJS/Core/_ErrorFromName",["WinJS/Core/_Base"],function(e){"use strict";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}),t("WinJS/Core/_Events",["exports","WinJS/Core/_Base"],function(e,t){"use strict";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 u=r[i];if(u.useCapture===n&&u.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,u=(n=n.slice(0,n.length)).length;o<u&&!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 u=r[i];if(u.listener===t&&u.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})}),t("WinJS/Core/_Trace",["WinJS/Core/_Global"],function(e){"use strict";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}}),t("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){"use strict";function u(){}function s(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?F:W,e._value=t,e._setState(n)}function a(e,t,n,r,i,o){return{exception:e,error:t,promise:n,handler:o,id:r,parent:i}}function c(e,t,n,r){var i=n._isException,o=n._errorId;return a(i?t:null,i?null:t,e,o,n,r)}function l(e,t,n){var r=n._isException,i=n._errorId;return b(e,i,r),a(r?t:null,r?null:t,e,i,n)}function f(e,t){var n=++U;return b(e,n),a(null,t,e,n)}function h(e,t){var n=++U;return b(e,n,!0),a(t,null,e,n)}function p(e,t,n,r){g(e,{c:t,e:n,p:r,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.done")})}function d(e,t,n,r){e._value=t,_(e,t,n,r),e._setState(H)}function v(t,n){var r=t._value,i=t._listeners;if(i){t._listeners=null;var u,s;for(u=0,s=Array.isArray(i)?i.length:1;u<s;u++){var a=1===s?i:i[u],c=a.c,l=a.promise;if(o._traceAsyncOperationCompleted(a.asyncOpID,e.Debug&&e.Debug.MS_ASYNC_OP_STATUS_SUCCESS),l){o._traceAsyncCallbackStarting(a.asyncOpID);try{l._setCompleteValue(c?c(r):r)}catch(e){l._setExceptionValue(e)}finally{o._traceAsyncCallbackCompleted()}l._state!==F&&l._listeners&&n.push(l)}else G.prototype.done.call(t,c)}}}function m(t,n){var r=t._value,i=t._listeners;if(i){t._listeners=null;var u,s;for(u=0,s=Array.isArray(i)?i.length:1;u<s;u++){var a=1===s?i:i[u],l=a.e,f=a.promise,h=e.Debug&&(r&&r.name===O?e.Debug.MS_ASYNC_OP_STATUS_CANCELED:e.Debug.MS_ASYNC_OP_STATUS_ERROR);if(o._traceAsyncOperationCompleted(a.asyncOpID,h),f){var p=!1;try{l?(o._traceAsyncCallbackStarting(a.asyncOpID),p=!0,l.handlesOnError||_(f,r,c,t,l),f._setCompleteValue(l(r))):f._setChainedErrorValue(r,t)}catch(e){f._setExceptionValue(e)}finally{p&&o._traceAsyncCallbackCompleted()}f._state!==F&&f._listeners&&n.push(f)}else J.prototype.done.call(t,null,l)}}}function _(e,t,n,r,i){if(k._listeners[S]){if(t instanceof Error&&t.message===O)return;k.dispatchEvent(S,n(e,t,r,i))}}function y(e,t){var n=e._listeners;if(n){var r,i;for(r=0,i=Array.isArray(n)?n.length:1;r<i;r++){var o=1===i?n:n[r],u=o.p;if(u)try{u(t)}catch(e){}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]).push(t):n=t,e._listeners=n}function b(e,t,n){e._isException=n||!1,e._errorId=t}function w(e,t,n,r){e._value=t,_(e,t,n,r),e._setState(z)}function E(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?F:N,e._value=t,e._setState(n)}function x(e,t,n,r){var i=new B(e);return g(e,{promise:i,c:t,e:n,p:r,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.then")}),i}function P(n){var r;return new $(function(i){n?r=e.setTimeout(i,n):t._setImmediate(i)},function(){r&&e.clearTimeout(r)})}function C(e,t){var n=function(){e.cancel()};return e.then(function(){t.cancel()}),t.then(n,n),t}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var k=new(n.Class.mix(n.Class.define(null,{},{supportedForProcessing:!1}),i.eventMixin));k._listeners={};var S="error",O="Canceled",A=!1,D={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};D.all=D.promise|D.thenPromise|D.errorPromise|D.exceptionPromise|D.completePromise;var j,T,F,L,I,M,W,N,H,z,U=1;j={name:"created",enter:function(e){e._setState(T)},cancel:u,done:u,then:u,_completed:u,_error:u,_notify:u,_progress:u,_setCompleteValue:u,_setErrorValue:u},T={name:"working",enter:u,cancel:function(e){e._setState(I)},done:p,then:x,_completed:s,_error:d,_notify:u,_progress:y,_setCompleteValue:E,_setErrorValue:w},F={name:"waiting",enter:function(e){var t=e._value;if(t instanceof B&&t._state!==z&&t._state!==N)g(t,{promise:e});else{var n=function(r){t._errorId?e._chainedError(r,t):(_(e,r,c,t,n),e._error(r))};n.handlesOnError=!0,t.then(e._completed.bind(e),n,e._progress.bind(e))}},cancel:function(e){e._setState(L)},done:p,then:x,_completed:s,_error:d,_notify:u,_progress:y,_setCompleteValue:E,_setErrorValue:w},L={name:"waiting_canceled",enter:function(e){e._setState(M);var t=e._value;t.cancel&&t.cancel()},cancel:u,done:p,then:x,_completed:s,_error:d,_notify:u,_progress:y,_setCompleteValue:E,_setErrorValue:w},I={name:"canceled",enter:function(e){e._setState(M),e._cancelAction()},cancel:u,done:p,then:x,_completed:s,_error:d,_notify:u,_progress:y,_setCompleteValue:E,_setErrorValue:w},M={name:"canceling",enter:function(e){var t=new Error(O);t.name=t.message,e._value=t,e._setState(H)},cancel:u,done:u,then:u,_completed:u,_error:u,_notify:u,_progress:u,_setCompleteValue:u,_setErrorValue:u},W={name:"complete_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.shift())._state._notify(t,n);e._setState(N)},cancel:u,done:null,then:null,_completed:u,_error:u,_notify:v,_progress:u,_setCompleteValue:u,_setErrorValue:u},N={name:"success",enter:function(e){e.done=G.prototype.done,e.then=G.prototype.then,e._cleanupAction()},cancel:u,done:null,then:null,_completed:u,_error:u,_notify:v,_progress:u,_setCompleteValue:u,_setErrorValue:u},H={name:"error_notify",enter:function(e){if(e.done=J.prototype.done,e.then=J.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(z)},cancel:u,done:null,then:null,_completed:u,_error:u,_notify:m,_progress:u,_setCompleteValue:u,_setErrorValue:u},z={name:"error",enter:function(e){e.done=J.prototype.done,e.then=J.prototype.then,e._cleanupAction()},cancel:u,done:null,then:null,_completed:u,_error:u,_notify:m,_progress:u,_setCompleteValue:u,_setErrorValue:u};var R,q=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){return this._state.then(this,e,t,n)},_chainedError:function(e,t){var n=this._state._error(this,e,l,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,l,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,h);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),B=n.Class.derive(q,function(e){A&&(!0===A||A&D.thenPromise)&&(this._stack=$._getStack()),this._creator=e,this._setState(j),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),J=n.Class.define(function(e){A&&(!0===A||A&D.errorPromise)&&(this._stack=$._getStack()),this._value=e,_(this,e,f)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||_(null,n,c,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&&n.message===O||$._doneHandler(n)},then:function(e,t){if(!t)return this;var n,r=this._value;try{t.handlesOnError||_(null,r,c,this,t),n=new G(t(r))}catch(e){n=e===r?this:new V(e)}return n}},{supportedForProcessing:!1}),V=n.Class.derive(J,function(e){A&&(!0===A||A&D.exceptionPromise)&&(this._stack=$._getStack()),this._value=e,_(this,e,h)},{},{supportedForProcessing:!1}),G=n.Class.define(function(e){if(A&&(!0===A||A&D.completePromise)&&(this._stack=$._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var t=new B(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){$._doneHandler(e)}},then:function(e){try{var t=e?e(this._value):this._value;return t===this._value?this:new G(t)}catch(e){return new V(e)}}},{supportedForProcessing:!1}),$=n.Class.derive(q,function(e,t){A&&(!0===A||A&D.promise)&&(this._stack=$._getStack()),this._oncancel=t,this._setState(j),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;k.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){k.addEventListener(e,t,n)},any:function(e){return new $(function(t,n){var r=Object.keys(e);0===r.length&&t();var i=0;r.forEach(function(o){$.as(e[o]).then(function(){t({key:o,value:e[o]})},function(u){u instanceof Error&&u.name===O?++i===r.length&&t($.cancel):n({key:o,value:e[o]})})})},function(){Object.keys(e).forEach(function(t){var n=$.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new G(e)},cancel:{get:function(){return R=R||new J(new r(O))}},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 $(function(t,n,r){var i=Object.keys(e),o=Array.isArray(e)?[]:{},u=Array.isArray(e)?[]:{},s=0,a=i.length,c=function(e){if(0==--a){var s=Object.keys(o).length;if(0===s)t(u);else{var c=0;i.forEach(function(e){var t=o[e];t instanceof Error&&t.name===O&&c++}),c===s?t($.cancel):n(o)}}else r({Key:e,Done:!0})};i.forEach(function(t){var n=e[t];void 0===n?s++:$.then(n,function(e){u[t]=e,c(t)},function(e){o[t]=e,c(t)})}),0!==(a-=s)||t(u)},function(){Object.keys(e).forEach(function(t){var n=$.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 $.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]=$.as(e[o]).then(t,n,r)}),$.join(i)},timeout:function(e,t){var n=P(e);return t?C(n,t):n},wrap:function(e){return new G(e)},wrapError:function(e){return new J(e)},_veryExpensiveTagWithStack:{get:function(){return A},set:function(e){A=e}},_veryExpensiveTagWithStack_tag:D,_getStack:function(){if(e.Debug&&e.Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}},_cancelBloc