/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
(function(){var e=["exports","require","vs/base/common/strings","vs/base/common/paths","vs/base/common/platform","vs/base/common/network","vs/base/common/resources","vs/base/common/uri","vs/workbench/parts/output/common/outputLinkComputer","vs/base/common/arrays","vs/editor/common/core/range"],t=function(t){for(var r=[],n=0,i=t.length;n<i;n++)r[n]=e[t[n]];return r};define(e[5],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command"}(t.Schemas||(t.Schemas={}))}),define(e[3],t([1,0,4,2]),function(e,t,r,n){"use strict";function i(e){return 47===e||92===e}function a(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?a(e.substring(0,e.length-1)):e.substr(1+~t)}function o(e,t){
if(null===e||void 0===e)return e;var n=e.length;if(0===n)return".";var a=!(!r.isWindows||!t);if(function(e,t){return t?!d.test(e):!l.test(e)}(e,a))return e;for(var o=a?"\\":"/",c=u(e,o),h=c.length,f=!1,p="",m=c.length;m<=n;m++)if(m===n||i(e.charCodeAt(m))){if(s(e,h,m,"..")){var g=p.lastIndexOf(o),v=p.slice(g+1);(c||v.length>0)&&".."!==v&&(p=-1===g?"":p.slice(0,g),f=!0)}else s(e,h,m,".")&&(c||p||m<n-1)&&(f=!0);if(!f){var A=e.slice(h,m);""!==p&&p[p.length-1]!==o&&(p+=o),p+=A}h=m+1,f=!1}return c+p}function s(e,t,r,n){return t+n.length===r&&e.indexOf(n,t)===t}function u(e,t){if(void 0===t&&(t="/"),!e)return"";var r=e.length,n=e.charCodeAt(0);if(i(n)){if(i(e.charCodeAt(1))&&!i(e.charCodeAt(2))){for(var a=3,o=a;a<r&&!i(e.charCodeAt(a));a++);if(o!==a&&!i(e.charCodeAt(a+1)))for(a+=1;a<r;a++)if(i(e.charCodeAt(a)))return e.slice(0,a+1).replace(/[\\/]/g,t)}return t}if(f(n)&&58===e.charCodeAt(1))return i(e.charCodeAt(2))?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://")
;if(-1!==s)for(s+=3;s<r;s++)if(i(e.charCodeAt(s)))return e.slice(0,s+1);return""}function c(e){if(!e)return!1;var t=e.charCodeAt(0);if(i(t))return!0;if(f(t)&&e.length>2&&58===e.charCodeAt(1)){if(i(e.charCodeAt(2)))return!0}return!1}function h(e){return!(!e||47!==e.charCodeAt(0))}function f(e){return e>=65&&e<=90||e>=97&&e<=122}Object.defineProperty(t,"__esModule",{value:!0}),t.sep="/",t.nativeSep=r.isWindows?"\\":"/",t.dirname=function(e,r){void 0===r&&(r=t.nativeSep);var n=e.length;if(0===n)return".";if(1===n)return i(e.charCodeAt(0))?e:".";var a=u(e,r).length;if(a>=n)return e;0===a&&i(e.charCodeAt(0))&&(a=1);var o=n-1;if(o>a)for(o--;o>a&&!i(e.charCodeAt(o));)o--;return 0===o?".":e.substr(0,o)},t.basename=a,t.extname=function(e){var t=~(e=a(e)).lastIndexOf(".");return t?e.substring(~t):""};var l=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,d=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;t.normalize=o,t.getRoot=u,t.join=function(){for(var e="",r=0;r<arguments.length;r++){var n=arguments[r];if(r>0){
if(!i(e.charCodeAt(e.length-1))){i(n.charCodeAt(0))||(e+=t.sep)}}e+=n}return o(e)},t.isUNC=function(e){if(!r.isWindows)return!1;if(!e||e.length<5)return!1;var t=e.charCodeAt(0);if(92!==t)return!1;if(92!==(t=e.charCodeAt(1)))return!1;for(var n=2,i=n;n<e.length&&92!==(t=e.charCodeAt(n));n++);return i!==n&&(t=e.charCodeAt(n+1),!isNaN(t)&&92!==t)};var p=r.isWindows?/[\\/:\*\?"<>\|]/g:/[\\/]/g,m=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])$/i;t.isValidBasename=function(e){return!(!e||0===e.length||/^\s+$/.test(e)||(p.lastIndex=0,p.test(e)||r.isWindows&&m.test(e)||"."===e||".."===e||r.isWindows&&"."===e[e.length-1]||r.isWindows&&e.length!==e.trim().length))},t.isEqual=function(e,t,r){var i=e===t;return!r||i?i:!(!e||!t)&&n.equalsIgnoreCase(e,t)},t.isEqualOrParent=function(e,r,i,a){if(void 0===a&&(a=t.nativeSep),e===r)return!0;if(!e||!r)return!1;if(r.length>e.length)return!1;if(i){if(!n.startsWithIgnoreCase(e,r))return!1;if(r.length===e.length)return!0;var o=r.length;return r.charAt(r.length-1)===a&&o--,
e.charAt(o)===a}return r.charAt(r.length-1)!==a&&(r+=a),0===e.indexOf(r)},t.isAbsolute=function(e){return r.isWindows?c(e):h(e)},t.isAbsolute_win32=c,t.isAbsolute_posix=h,t.isWindowsDriveLetter=f}),define(e[6],t([1,0,3,7,2,5,4]),function(e,t,r,n,i,a,o){"use strict";function s(e){return!e||e.scheme!==a.Schemas.file||!o.isLinux}function u(e,t,n){if(void 0===n&&(n=s(e)),e.scheme===t.scheme){if(e.scheme===a.Schemas.file)return r.isEqualOrParent(h(e),h(t),n);if(function(e,t,r){return e===t||r&&e&&t&&i.equalsIgnoreCase(e,t)}(e.authority,t.authority,n))return r.isEqualOrParent(e.path,t.path,n,"/")}return!1}function c(e){return r.basename(e.path)}function h(e){var t,n=e.path;return t=e.authority&&n.length>1&&"file"===e.scheme?"//"+e.authority+n:o.isWindows&&47===n.charCodeAt(0)&&r.isWindowsDriveLetter(n.charCodeAt(1))&&58===n.charCodeAt(2)?n.substr(1):n,o.isWindows&&(t=t.replace(/\//g,"\\")),t}Object.defineProperty(t,"__esModule",{value:!0}),t.getComparisonKey=function(e){
return s(e)?e.toString().toLowerCase():e.toString()},t.hasToIgnoreCase=s,t.basenameOrAuthority=function(e){return c(e)||e.authority},t.isEqualOrParent=u,t.isEqual=function(e,t,r){return void 0===r&&(r=s(e)),!(e!==t)||!(!e||!t)&&(r?i.equalsIgnoreCase(e.toString(),t.toString()):e.toString()===t.toString())},t.basename=c,t.dirname=function(e){if(0===e.path.length)return e;if(e.scheme===a.Schemas.file)return n.URI.file(r.dirname(h(e)));var t=r.dirname(e.path,"/");return e.authority&&t.length&&47!==t.charCodeAt(0)?null:e.with({path:t})},t.joinPath=function(e,t){var i;return i=e.scheme===a.Schemas.file?n.URI.file(r.join(h(e),t)).path:r.join(e.path,t),e.with({path:i})},t.normalizePath=function(e){if(!e.path.length)return e;var t;return t=e.scheme===a.Schemas.file?n.URI.file(r.normalize(h(e))).path:r.normalize(e.path),e.with({path:t})},t.fsPath=h,t.isAbsolutePath=function(e){return r.isAbsolute(e.path)},t.distinctParents=function(e,t){for(var r=[],n=function(n){var i=t(e[n]);if(e.some(function(e,r){
return r!==n&&u(i,t(e))}))return"continue";r.push(e[n])},i=0;i<e.length;i++)n(i);return r},t.isMalformedFileUri=function(e){if(!e.scheme||o.isWindows&&e.scheme.match(/^[a-zA-Z]$/))return n.URI.file((e.scheme?e.scheme+":":"")+e.path)};!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){var r=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(function(e){var t=e.split(":"),n=t[0],i=t[1];n&&i&&r.set(n,i)});var n=t.path.substring(0,t.path.indexOf(";"));return n&&r.set(e.META_DATA_MIME,n),r}}(t.DataUri||(t.DataUri={}))}),define(e[8],t([1,0,7,3,6,2,9,10]),function(e,t,r,n,i,a,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){this.ctx=e,this.patterns=new Map,this.computePatterns(t)}return e.prototype.computePatterns=function(t){var n=this;t.workspaceFolders.map(function(e){return r.URI.parse(e)}).forEach(function(t){
var r=e.createPatterns(t);n.patterns.set(t,r)})},e.prototype.getModel=function(e){for(var t=0,r=this.ctx.getMirrorModels();t<r.length;t++){var n=r[t];if(n.uri.toString()===e)return n}return null},e.prototype.computeLinks=function(t){var r=this.getModel(t);if(!r)return Promise.resolve([]);var n=[],a=r.getValue().split(/\r\n|\r|\n/);return this.patterns.forEach(function(t,r){for(var o={toResource:function(e){return"string"==typeof e?i.joinPath(r,e):null}},s=0,u=a.length;s<u;s++)n.push.apply(n,e.detectLinks(a[s],s+1,t,o))}),Promise.resolve(n)},e.createPatterns=function(e){var t=[],r="file"===e.scheme?e.fsPath:e.path;return o.distinct([n.normalize(r,!0),n.normalize(r,!1)]).forEach(function(e){var r='(?:[^\\s\\(\\):<>"]| [^\\s\\(\\):<>"])+\\.[^\\s\\(\\):<>"]+';t.push(new RegExp(a.escapeRegExpCharacters(e)+"("+r+") on line ((\\d+)(, column (\\d+))?)","gi")),t.push(new RegExp(a.escapeRegExpCharacters(e)+"("+r+"):line ((\\d+)(, column (\\d+))?)","gi")),
t.push(new RegExp(a.escapeRegExpCharacters(e)+"("+r+")(\\s?\\((\\d+)(,(\\d+))?)\\)","gi")),t.push(new RegExp(a.escapeRegExpCharacters(e)+'([^\\s\\(\\):<>"]+)(:(\\d+))?(:(\\d+))?',"gi"))}),t},e.detectLinks=function(e,t,r,n){var i=[];return r.forEach(function(r){r.lastIndex=0;for(var o,u=0,c=function(){var r=a.rtrim(o[1],".").replace(/\\/g,"/"),c=void 0;try{var h=n.toResource(r);h&&(c=h.toString())}catch(e){return"continue"}if(o[3]){var f=o[3];if(o[5]){var l=o[5];c=a.format("{0}#{1},{2}",c,f,l)}else c=a.format("{0}#{1}",c,f)}var d=a.rtrim(o[0],"."),p=e.indexOf(d,u);u+=p+d.length;var m={startColumn:p+1,startLineNumber:t,endColumn:p+1+d.length,endLineNumber:t};if(i.some(function(e){return s.Range.areIntersectingOrTouching(e.range,m)}))return{value:void 0};i.push({range:m,url:c})};null!==(o=r.exec(e));){var h=c();if("object"==typeof h)return h.value}}),i},e}();t.OutputLinkComputer=u,t.create=function(e,t){return new u(e,t)}})}).call(this);
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/bb1e228e30ce43ebb361c84fdf2f0d4fb7fda6ce/core/vs/workbench/parts/output/common/outputLinkComputer.js.map
